diff options
Diffstat (limited to 'testsuite/tests/typing-gadts/pr5689.ml.principal.reference')
-rw-r--r-- | testsuite/tests/typing-gadts/pr5689.ml.principal.reference | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/testsuite/tests/typing-gadts/pr5689.ml.principal.reference b/testsuite/tests/typing-gadts/pr5689.ml.principal.reference new file mode 100644 index 0000000000..f1e142aada --- /dev/null +++ b/testsuite/tests/typing-gadts/pr5689.ml.principal.reference @@ -0,0 +1,28 @@ + +# 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 +# |