Source

mutated_ocaml / testsuite / tests / typing-gadts / pr5689.ml.reference

#               type inkind = [ `Link | `Nonlink ]
type _ inline_t =
    Text : string -> [< inkind > `Nonlink ] inline_t
  | Bold : 'a inline_t list -> 'a inline_t
  | Link : string -> [< inkind > `Link ] inline_t
  | Mref : string *
      [ `Nonlink ] inline_t list -> [< inkind > `Link ] inline_t
#                 val uppercase : 'a inline_t list -> 'a inline_t list = <fun>
#             type ast_t =
    Ast_Text of string
  | Ast_Bold of ast_t list
  | Ast_Link of string
  | Ast_Mref of string * ast_t list
#                         val inlineseq_from_astseq : ast_t list -> inkind inline_t list = <fun>
#           type _ linkp = Nonlink : [ `Nonlink ] linkp | Maylink : inkind linkp
#                           val inlineseq_from_astseq : ast_t list -> inkind inline_t list = <fun>
#       type _ linkp2 = Kind : 'a linkp -> ([< inkind ] as 'a) linkp2
#                         Characters 272-279:
      | (Kind Maylink, Ast_Link lnk)    -> Link lnk
              ^^^^^^^
Error: This pattern matches values of type inkind linkp
       but a pattern was expected which matches values of type
         ([< inkind ] as 'a) linkp
       Type inkind = [ `Link | `Nonlink ] is not compatible with type
         'a = [< `Link | `Nonlink ] 
       Types for tag `Nonlink are incompatible
# 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.