Closed japgolly closed 3 years ago
Minimized
inline def f: Unit =
inline 1 match
case 1 | 2 =>
def test = f
5 |def test = f
| ^
| cannot reduce inline match with
| scrutinee: 1 : (1 : Int)
| patterns : case 1 | 2
| This location contains code that was inlined from Foo.scala:2
Workaround: Avoid alternatives in inline matches.
- case 1 | 2 =>
+ case 1 =>
+ case 2 =>
Similar to #12072. In this case,
inline match
expressions that work normally, fail to compile in overridden methods.Compiler version
Both:
Minimized code
Output
Expectation
It should compile.