You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--Error:/home/kpi/wiadro/infix_things.scala:2:8------------------------------2| infix caseAdd1[L, R](l: L, r: R)
| ^^^^
| end of statement expected but 'case' found
-- [E145] SyntaxError:/home/kpi/wiadro/infix_things.scala:1:5----------------1|enumExpr1:| ^^^^^
|Enumerations must contain at least one case|| longer explanation available when compiling with`-explain`-- [E006] NotFoundError:/home/kpi/wiadro/infix_things.scala:2:2-------------2| infix caseAdd1[L, R](l: L, r: R)
| ^^^^^
|Notfound: infix
|| longer explanation available when compiling with`-explain`
Expectation
infix should be allowed on enumcases (that declare class types)
At first sight, it seems just right, but there might be some edge cases I don't see now. CC @mbovel
There is also a question of whether it should even be supported. I felt like the decision in #18933 was that it should. Is there a spec for infix things?
Compiler version
7ba88ad
Minimized code
Output
Expectation
infix
should be allowed onenum
case
s (that declare class types)Other info
Other similar issues:
infix enum
: Souldinfix
work onenum
? #18933infix
constructs:infix
keyword is allowed where it has no effect, and has undocumented uses #17738The text was updated successfully, but these errors were encountered: