Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
Signed-off-by: Jade Abraham <[email protected]>
  • Loading branch information
jabraham17 committed Nov 6, 2024
1 parent 454957c commit 33b7bff
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 30 deletions.
16 changes: 8 additions & 8 deletions frontend/test/resolution/testResolverVerboseErrors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ static const char* errorExactMatch = R"""(
The following candidate didn't match because an actual couldn't be passed to a formal:
|
4 | proc f(ref x: owned Parent) {}
| ⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺
|
The formal 'x' expects a value of type 'owned Parent', but the actual was a value of type 'owned Child'.
|
Expand All @@ -89,7 +89,7 @@ static const char* errorExpectedSubType = R"""(
The following candidate didn't match because an actual couldn't be passed to a formal:
|
1 | proc f(type x: string) {}
| ⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺
|
The formal 'x' expects the type 'string', but the actual was the type 'int(64)'.
|
Expand Down Expand Up @@ -118,7 +118,7 @@ static const char* errorIncompatibleMgr = R"""(
The following candidate didn't match because an actual couldn't be passed to a formal:
|
3 | proc f(x: owned C) {}
| ⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺
|
The formal 'x' expects a value of type 'owned C', but the actual was a value of type 'shared C'.
|
Expand Down Expand Up @@ -147,7 +147,7 @@ static const char* errorIncompatibleNilability = R"""(
The following candidate didn't match because an actual couldn't be passed to a formal:
|
3 | proc f(x: owned C) {}
| ⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺
|
The formal 'x' expects a value of type 'owned C', but the actual was a value of type 'owned C?'.
|
Expand All @@ -174,7 +174,7 @@ static const char* errorTupleSize = R"""(
The following candidate didn't match because an actual couldn't be passed to a formal:
|
1 | proc f(x: (?, ?, ?)) {}
| ⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺
|
The formal 'x' expects a value of type '(?, ?, ?)', but the actual was a value of type '(int(64), int(64))'.
|
Expand All @@ -200,7 +200,7 @@ static const char* errorStarVsNotStar = R"""(
The following candidate didn't match because an actual couldn't be passed to a formal:
|
1 | proc f(in x: 3*real) {}
| ⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺
|
The formal 'x' expects a value of type '(real(64), real(64), real(64))', but the actual was a value of type '(real(64), real(64), bool)'.
|
Expand Down Expand Up @@ -310,7 +310,7 @@ static const char* errorManyCandidates = R"""(
The following candidate didn't match because an actual couldn't be passed to a formal:
|
1 | proc f(x: int(8)) {}
| ⎺⎺⎺⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺⎺⎺⎺
|
The formal 'x' expects a value of type 'int(8)', but the actual was a param of type 'string'.
|
Expand All @@ -321,7 +321,7 @@ static const char* errorManyCandidates = R"""(
The following candidate didn't match because an actual couldn't be passed to a formal:
|
2 | proc f(x: int(16)) {}
| ⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺
|
The formal 'x' expects a value of type 'int(16)', but the actual was a param of type 'string'.
|
Expand Down
2 changes: 1 addition & 1 deletion test/errors/parsing/underscores.2.good
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,6 @@
Formals in a procedure definition must be named
|
37 | proc f(_: int) {}
| ⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺
|

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
Redefined here:
|
3 | var foo: int;
| ⎺⎺⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺⎺⎺
|

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
It was first defined here:
|
6 | var a: real;
| ⎺⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺⎺
|
Redefined through the 'import' of 'Lib1' here:
|
Expand All @@ -13,6 +13,6 @@
Leading to the definition here:
|
2 | var a: int;
| ⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺
|

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
It was first defined here:
|
6 | var a: real;
| ⎺⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺⎺
|
Redefined through the 'use' of 'Lib1' here:
|
Expand All @@ -13,6 +13,6 @@
Leading to the definition here:
|
2 | var a: int;
| ⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺
|

Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
It was first defined here:
|
2 | proc f(x: int, x)
| ⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺
|
Redefined here:
|
2 | proc f(x: int, x)
| ⎺
| ⎺
|

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Leading to the definition here:
|
2 | var a: int;
| ⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺
|
Redefined through the 'import' of 'Lib2' here:
|
Expand All @@ -18,6 +18,6 @@
Leading to the definition here:
|
6 | var a: real;
| ⎺⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺⎺
|

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Leading to the definition here:
|
2 | var a: int;
| ⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺
|
Redefined through the 'import' of 'Lib2' here:
|
Expand All @@ -18,6 +18,6 @@
Leading to the definition here:
|
6 | var a: real;
| ⎺⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺⎺
|

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Leading to the definition here:
|
2 | var a: int;
| ⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺
|
Redefined through the 'use' of 'Lib2' here:
|
Expand All @@ -18,6 +18,6 @@
Leading to the definition here:
|
6 | var b: real;
| ⎺⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺⎺
|

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Leading to the definition here:
|
2 | var a: int;
| ⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺
|
Redefined through the 'use' of 'Lib2' here:
|
Expand All @@ -18,6 +18,6 @@
Leading to the definition here:
|
6 | var a: real;
| ⎺⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺⎺
|

4 changes: 2 additions & 2 deletions test/errors/scope-resolution/use-shadows-formal1.2-0.good
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
Leading to 'b' defined here:
|
2 | var b: int;
| ⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺
|
But, there is a shadowed symbol 'a' defined here:
|
13 | proc foo(a: real) {
| ⎺⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺⎺
|

0
8 changes: 4 additions & 4 deletions test/errors/scope-resolution/use-shadows-formal2.2.good
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
It was first defined here:
|
2 | var b: int;
| ⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺
|
Redefined here:
|
3 | var b: real;
| ⎺⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺⎺
|

─── warning in use-shadows-formal2.chpl:16 [PotentiallySurprisingShadowing] ───
Expand All @@ -30,11 +30,11 @@
Leading to 'b' defined here:
|
2 | var b: int;
| ⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺
|
But, there is a shadowed symbol 'a' defined here:
|
14 | proc foo(a: real) {
| ⎺⎺⎺⎺⎺⎺⎺
| ⎺⎺⎺⎺⎺⎺⎺
|

0 comments on commit 33b7bff

Please sign in to comment.