diff --git a/testsuite/verona_nostdlib/issues/651/651.verona b/testsuite/verona_nostdlib/issues/651/651.verona new file mode 100644 index 000000000..cc9c60a3f --- /dev/null +++ b/testsuite/verona_nostdlib/issues/651/651.verona @@ -0,0 +1,3 @@ +type Copyable[Self] = { // This loops forever due to parameter name self + copy(self: Self) : Self +} & (Self < Copyable[Self]) diff --git a/testsuite/verona_nostdlib/issues/651/651_out/00_parse.trieste b/testsuite/verona_nostdlib/issues/651/651_out/00_parse.trieste new file mode 100644 index 000000000..635e98963 --- /dev/null +++ b/testsuite/verona_nostdlib/issues/651/651_out/00_parse.trieste @@ -0,0 +1,33 @@ +Verona +parse +(top + {} + (file + (equals + (group + (typealias + {}) + (ident 8:Copyable) + (square + (group + (Self)))) + (group + (brace + (group + (ident 4:copy) + (paren + (group + (ident 4:self) + (colon) + (Self))) + (colon) + (Self))) + (symbol 1:&) + (paren + (group + (Self) + (symbol 1:<) + (ident 8:Copyable) + (square + (group + (Self))))))))) diff --git a/testsuite/verona_nostdlib/issues/651/651_out/01_modules.trieste b/testsuite/verona_nostdlib/issues/651/651_out/01_modules.trieste new file mode 100644 index 000000000..df97497ec --- /dev/null +++ b/testsuite/verona_nostdlib/issues/651/651_out/01_modules.trieste @@ -0,0 +1,42 @@ +Verona +modules +(top + {} + (group + (class + {}) + (ident 3:651) + (brace + (group + (use) + (ident 3:std) + (doublecolon) + (ident 7:builtin)) + (equals + (group + (typealias + {}) + (ident 8:Copyable) + (square + (group + (Self)))) + (group + (brace + (group + (ident 4:copy) + (paren + (group + (ident 4:self) + (type + (Self)))) + (type + (Self)))) + (symbol 1:&) + (paren + (group + (Self) + (symbol 1:<) + (ident 8:Copyable) + (square + (group + (Self)))))))))) diff --git a/testsuite/verona_nostdlib/issues/651/651_out/02_structure.trieste b/testsuite/verona_nostdlib/issues/651/651_out/02_structure.trieste new file mode 100644 index 000000000..1837e7d1a --- /dev/null +++ b/testsuite/verona_nostdlib/issues/651/651_out/02_structure.trieste @@ -0,0 +1,70 @@ +Verona +structure +(top + { + 651 = class} + (class + { + Copyable = typealias + include 651} + (ident 3:651) + (typeparams) + (inherit + (dontcare)) + (typepred + (type + (typetrue))) + (classbody + (use + (type + (ident 3:std) + (doublecolon) + (ident 7:builtin))) + (typealias + { + trait$0 = typetrait} + (ident 8:Copyable) + (typeparams + (error + (errormsg 46:Expected a type parameter or a value parameter) + (group + (Self)))) + (typepred + (type + (typetrue))) + (type + (typetrait + { + copy = function} + (ident 7:trait$0) + (classbody + (function + { + self = param} + (explicit) + (rhs) + (ident 4:copy) + (typeparams) + (params + (param + (ident 4:self) + (type + (Self)) + (dontcare))) + (type + (Self)) + (dontcare) + (typepred + (type + (typetrue))) + (dontcare)))) + (symbol 1:&) + (type + (typetuple + (type + (Self) + (symbol 1:<) + (ident 8:Copyable) + (typeargs + (type + (Self))))))))))) diff --git a/testsuite/verona_nostdlib/issues/651/651_out/ast b/testsuite/verona_nostdlib/issues/651/651_out/ast new file mode 100644 index 000000000..1837e7d1a --- /dev/null +++ b/testsuite/verona_nostdlib/issues/651/651_out/ast @@ -0,0 +1,70 @@ +Verona +structure +(top + { + 651 = class} + (class + { + Copyable = typealias + include 651} + (ident 3:651) + (typeparams) + (inherit + (dontcare)) + (typepred + (type + (typetrue))) + (classbody + (use + (type + (ident 3:std) + (doublecolon) + (ident 7:builtin))) + (typealias + { + trait$0 = typetrait} + (ident 8:Copyable) + (typeparams + (error + (errormsg 46:Expected a type parameter or a value parameter) + (group + (Self)))) + (typepred + (type + (typetrue))) + (type + (typetrait + { + copy = function} + (ident 7:trait$0) + (classbody + (function + { + self = param} + (explicit) + (rhs) + (ident 4:copy) + (typeparams) + (params + (param + (ident 4:self) + (type + (Self)) + (dontcare))) + (type + (Self)) + (dontcare) + (typepred + (type + (typetrue))) + (dontcare)))) + (symbol 1:&) + (type + (typetuple + (type + (Self) + (symbol 1:<) + (ident 8:Copyable) + (typeargs + (type + (Self))))))))))) diff --git a/testsuite/verona_nostdlib/issues/651/651_out/exit_code.txt b/testsuite/verona_nostdlib/issues/651/651_out/exit_code.txt new file mode 100644 index 000000000..56a6051ca --- /dev/null +++ b/testsuite/verona_nostdlib/issues/651/651_out/exit_code.txt @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/testsuite/verona_nostdlib/issues/651/651_out/stderr.txt b/testsuite/verona_nostdlib/issues/651/651_out/stderr.txt new file mode 100644 index 000000000..e69de29bb diff --git a/testsuite/verona_nostdlib/issues/651/651_out/stdout.txt b/testsuite/verona_nostdlib/issues/651/651_out/stdout.txt new file mode 100644 index 000000000..0bb53356b --- /dev/null +++ b/testsuite/verona_nostdlib/issues/651/651_out/stdout.txt @@ -0,0 +1,8 @@ +Errors: +Expected a type parameter or a value parameter +-- 651.verona:1:15 +type Copyable[Self] = { // This loops forever due to parameter name self + ~~~~ + +Pass structure failed with 1 error! +