-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
47cfd1e
commit 61f4b7f
Showing
21 changed files
with
59 additions
and
57 deletions.
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
4 changes: 0 additions & 4 deletions
4
tests/neg-custom-args/quoted-pattern-poly/quoted-pattern-with-bounded-type-params.check
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
tests/neg-custom-args/quoted-pattern-poly/quoted-pattern-with-type-params.check
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
tests/neg-macros/quoted-pattern-with-bounded-type-params-regression.check
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,12 @@ | ||
-- Error: tests/neg-macros/quoted-pattern-with-bounded-type-params.scala:10:48 ----------------------------------------- | ||
10 | case '{ [A <: Int, B] => (x : A, y : A) => $b[A](x, y) : A } => // error | ||
| ^ | ||
| Type must be fully defined. | ||
| Consider annotating the splice using a type ascription: | ||
| (${b}: XYZ). | ||
-- [E006] Not Found Error: tests/neg-macros/quoted-pattern-with-bounded-type-params.scala:11:10 ------------------------ | ||
11 | '{ $b[String]("truthy", "falsy") } // error | ||
| ^ | ||
| Not found: b | ||
| | ||
| longer explanation available when compiling with `-explain` |
9 changes: 5 additions & 4 deletions
9
...ed-pattern-with-bounded-type-params.scala → ...with-bounded-type-params-regression.scala
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
16 changes: 4 additions & 12 deletions
16
tests/neg-macros/quoted-pattern-with-bounded-type-params.check
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 |
---|---|---|
@@ -1,12 +1,4 @@ | ||
-- Error: tests/neg-macros/quoted-pattern-with-bounded-type-params.scala:10:48 ----------------------------------------- | ||
10 | case '{ [A <: Int, B] => (x : A, y : A) => $b[A](x, y) : A } => // error | ||
| ^ | ||
| Type must be fully defined. | ||
| Consider annotating the splice using a type ascription: | ||
| (${b}: XYZ). | ||
-- [E006] Not Found Error: tests/neg-macros/quoted-pattern-with-bounded-type-params.scala:11:10 ------------------------ | ||
11 | '{ $b[String]("truthy", "falsy") } // error | ||
| ^ | ||
| Not found: b | ||
| | ||
| longer explanation available when compiling with `-explain` | ||
-- Error: tests/neg-custom-args/quoted-pattern-poly/quoted-pattern-with-bounded-type-params.scala:10:50 ---------------- | ||
10 | case '{ [A <: Int, B] => (x : A, y : A) => $b[A](x, y) : A } => ??? // error | ||
| ^ | ||
| Implementation restriction: Type arguments to Open pattern are expected to have no bounds |
10 changes: 5 additions & 5 deletions
10
tests/neg-macros/quoted-pattern-with-bounded-type-params.scala
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
16 changes: 16 additions & 0 deletions
16
tests/neg-macros/quoted-pattern-with-type-params-regression.check
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,16 @@ | ||
-- Error: tests/neg-macros/quoted-pattern-with-type-params.scala:8:31 -------------------------------------------------- | ||
8 | case '{ [A] => (x : A) => $b[A] : (A => A) } => ??? // error | ||
| ^ | ||
| Type must be fully defined. | ||
| Consider annotating the splice using a type ascription: | ||
| (${b}: XYZ). | ||
-- Error: tests/neg-macros/quoted-pattern-with-type-params.scala:9:33 -------------------------------------------------- | ||
9 | case '{ [A] => (x : A) => $b(x) : (A => A) } => ??? // error | ||
| ^ | ||
| Type variables that this argument depends on are not captured in this hoas pattern | ||
-- Error: tests/neg-macros/quoted-pattern-with-type-params.scala:10:24 ------------------------------------------------- | ||
10 | case '{ (a:Int) => $b[Int](a) : String } => ??? // error | ||
| ^ | ||
| Type must be fully defined. | ||
| Consider annotating the splice using a type ascription: | ||
| (${b}: XYZ). |
3 changes: 3 additions & 0 deletions
3
...oly/quoted-pattern-with-type-params.scala → ...pattern-with-type-params-regression.scala
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 |
---|---|---|
@@ -1,16 +1,12 @@ | ||
-- Error: tests/neg-macros/quoted-pattern-with-type-params.scala:8:31 -------------------------------------------------- | ||
8 | case '{ [A] => (x : A) => $b[A] : (A => A) } => ??? // error | ||
| ^ | ||
| Type must be fully defined. | ||
| Consider annotating the splice using a type ascription: | ||
| (${b}: XYZ). | ||
-- Error: tests/neg-macros/quoted-pattern-with-type-params.scala:9:33 -------------------------------------------------- | ||
9 | case '{ [A] => (x : A) => $b(x) : (A => A) } => ??? // error | ||
-- Error: tests/neg-custom-args/quoted-pattern-poly/quoted-pattern-with-type-params.scala:5:32 ------------------------- | ||
5 | case '{ [A] => (x : A) => $b[A] : (A => A) } => ??? // error | ||
| ^^^^^ | ||
| Implementation restriction: A higher-order pattern must carry value arguments | ||
-- Error: tests/neg-custom-args/quoted-pattern-poly/quoted-pattern-with-type-params.scala:6:33 ------------------------- | ||
6 | case '{ [A] => (x : A) => $b(x) : (A => A) } => ??? // error | ||
| ^ | ||
| Type variables that this argument depends on are not captured in this hoas pattern | ||
-- Error: tests/neg-macros/quoted-pattern-with-type-params.scala:10:24 ------------------------------------------------- | ||
10 | case '{ (a:Int) => $b[Int](a) : String } => ??? // error | ||
| ^ | ||
| Type must be fully defined. | ||
| Consider annotating the splice using a type ascription: | ||
| (${b}: XYZ). | ||
-- Error: tests/neg-custom-args/quoted-pattern-poly/quoted-pattern-with-type-params.scala:7:26 ------------------------- | ||
7 | case '{ (a:Int) => $b[Int](a) : String } => ??? // error | ||
| ^^^ | ||
| Type arguments of a hoas pattern needs to be defined inside the quoted pattern |
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
1 change: 1 addition & 0 deletions
1
...poly/quoted-patten-with-type-params.scala → ...cros/quoted-patten-with-type-params.scala
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
...ch-poly-function-regression/Macro_1.scala → ...quote-match-poly-function-1/Macro_1.scala
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
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
...y/quote-match-poly-function/Macro_1.scala → ...quote-match-poly-function-2/Macro_1.scala
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
File renamed without changes.