-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Make verona testsuite directory dump passes. * Add test case for issue #651 * Extend test to cover related bug.
- Loading branch information
Showing
9 changed files
with
239 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// Using reserved keyword in parameter and type parameter should result in errors. | ||
type Copyable[Self] = { | ||
copy(type: Self) : Self | ||
} & (Self < Copyable[Self]) |
34 changes: 34 additions & 0 deletions
34
testsuite/verona_nostdlib/issues/651/651_out/00_parse.trieste
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Verona | ||
parse | ||
(top | ||
{} | ||
(file | ||
(equals | ||
(group | ||
(typealias | ||
{}) | ||
(ident 8:Copyable) | ||
(square | ||
(group | ||
(Self)))) | ||
(group | ||
(brace | ||
(group | ||
(ident 4:copy) | ||
(paren | ||
(group | ||
(typealias | ||
{}) | ||
(colon) | ||
(Self))) | ||
(colon) | ||
(Self))) | ||
(symbol 1:&) | ||
(paren | ||
(group | ||
(Self) | ||
(symbol 1:<) | ||
(ident 8:Copyable) | ||
(square | ||
(group | ||
(Self))))))))) |
43 changes: 43 additions & 0 deletions
43
testsuite/verona_nostdlib/issues/651/651_out/01_modules.trieste
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
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 | ||
(typealias | ||
{}) | ||
(type | ||
(Self)))) | ||
(type | ||
(Self)))) | ||
(symbol 1:&) | ||
(paren | ||
(group | ||
(Self) | ||
(symbol 1:<) | ||
(ident 8:Copyable) | ||
(square | ||
(group | ||
(Self)))))))))) |
71 changes: 71 additions & 0 deletions
71
testsuite/verona_nostdlib/issues/651/651_out/02_structure.trieste
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
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 | ||
{} | ||
(explicit) | ||
(rhs) | ||
(ident 4:copy) | ||
(typeparams) | ||
(params | ||
(error | ||
(errormsg 20:Expected a parameter) | ||
(group | ||
(typealias | ||
{}) | ||
(type | ||
(Self))))) | ||
(type | ||
(Self)) | ||
(dontcare) | ||
(typepred | ||
(type | ||
(typetrue))) | ||
(dontcare)))) | ||
(symbol 1:&) | ||
(type | ||
(typetuple | ||
(type | ||
(Self) | ||
(symbol 1:<) | ||
(ident 8:Copyable) | ||
(typeargs | ||
(type | ||
(Self))))))))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
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 | ||
{} | ||
(explicit) | ||
(rhs) | ||
(ident 4:copy) | ||
(typeparams) | ||
(params | ||
(error | ||
(errormsg 20:Expected a parameter) | ||
(group | ||
(typealias | ||
{}) | ||
(type | ||
(Self))))) | ||
(type | ||
(Self)) | ||
(dontcare) | ||
(typepred | ||
(type | ||
(typetrue))) | ||
(dontcare)))) | ||
(symbol 1:&) | ||
(type | ||
(typetuple | ||
(type | ||
(Self) | ||
(symbol 1:<) | ||
(ident 8:Copyable) | ||
(typeargs | ||
(type | ||
(Self))))))))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Errors: | ||
Expected a type parameter or a value parameter | ||
-- 651.verona:2:15 | ||
type Copyable[Self] = { | ||
~~~~ | ||
|
||
---------------- | ||
Expected a parameter | ||
-- 651.verona:3:8 | ||
copy(type: Self) : Self | ||
~~~~~~~~~~ | ||
|
||
Pass structure failed with 2 errors! | ||
|