-
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.
Some parser changes to handle erased as a soft keyword
- Loading branch information
1 parent
63d31a6
commit 2093b87
Showing
2 changed files
with
36 additions
and
13 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
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,18 @@ | ||
def f1(x: Int, erased y: Int) = 0 | ||
def f2(x: Int, erased: Int) = 0 | ||
inline def f3(x: Int, inline erased: Int) = 0 | ||
def f4(x: Int, erased inline: Int) = 0 | ||
// inline def f5(x: Int, erased inline y: Int) = 0 // should parse but rejected later | ||
|
||
def f6(using erased y: Int) = 0 | ||
def f7(using erased: Int) = 0 | ||
inline def f8(using inline erased: Int) = 0 | ||
def f9(using erased inline: Int) = 0 | ||
// inline def f10(using erased inline x: Int) = 0 // should parse but rejected later | ||
def f11(using erased Int) = 0 | ||
|
||
val v1 = (erased: Int) => 0 | ||
val v2: Int => Int = erased => 0 | ||
val v3 = (erased x: Int) => 0 | ||
val v4: (erased Int) => Int = (erased x) => 0 | ||
val v5: (erased: Int) => Int = x => 0 |