Open
Description
Compiler version
Minimized code
enum Expr1:
infix case Add1[L, R](l: L, r: R)
Output
-- Error: /home/kpi/wiadro/infix_things.scala:2:8 ------------------------------
2 | infix case Add1[L, R](l: L, r: R)
| ^^^^
| end of statement expected but 'case' found
-- [E145] Syntax Error: /home/kpi/wiadro/infix_things.scala:1:5 ----------------
1 |enum Expr1:
| ^^^^^
| Enumerations must contain at least one case
|
| longer explanation available when compiling with `-explain`
-- [E006] Not Found Error: /home/kpi/wiadro/infix_things.scala:2:2 -------------
2 | infix case Add1[L, R](l: L, r: R)
| ^^^^^
| Not found: infix
|
| longer explanation available when compiling with `-explain`
Expectation
infix
should be allowed on enum
case
s (that declare class types)
Other info
Other similar issues:
- relevant discussion about
infix enum
: Souldinfix
work onenum
? #18933 - discussion about supported
infix
constructs:infix
keyword is allowed where it has no effect, and has undocumented uses #17738