-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area:experimental:modularityIssues related to the modularity extension.Issues related to the modularity extension.area:parserarea:specitype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymore
Description
Based on OpenCB failure in makiftutuncu/as
- build logs
Based on the current syntax as
keyword can be present only in NamedSelector
which can be placed only in the import statement.
AFAIK under the new givens syntax as
keyword can be present only within type definition context bounds, however, it is not documented in any form.
Compiler version
Last good release: 3.6.0-RC1-bin-20241003-a672e05-NIGHTLY
First bad release: 3.6.0-RC1-bin-20241005-6fa81cf-NIGHTLY
Bisect points to 14acdc0
Minimized code
infix trait as[From, To]
val conv: (String as Int) = ???
given instance: (String as Int) = ???
def test(ev: (String as Int)) = ???
Output
-- [E040] Syntax Error: /Users/wmazur/projects/sandbox/test.scala:3:18 --------------------------------------------------------------------------------------------------------------------
3 |val conv: (String as Int) = ???
| ^^
| ')' expected, but identifier found
-- [E040] Syntax Error: /Users/wmazur/projects/sandbox/test.scala:4:24 --------------------------------------------------------------------------------------------------------------------
4 |given instance: (String as Int) = ???
| ^^
| ',' or ')' expected, but identifier found
-- [E040] Syntax Error: /Users/wmazur/projects/sandbox/test.scala:5:21 --------------------------------------------------------------------------------------------------------------------
5 |def test(ev: (String as Int)) = ???
| ^^
| ')' expected, but identifier found
3 errors found
Expectation
Should be parsable or syntax reference should be updated.
Metadata
Metadata
Assignees
Labels
area:experimental:modularityIssues related to the modularity extension.Issues related to the modularity extension.area:parserarea:specitype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymore