Closed
Description
Compiler version
3.1.0
Minimized code
trait Test {
inline def msg: String
}
//Does not compile
inline def foo: Test = new Test {
override inline def msg: String = "hello"
}
//Compiles
class HelloTest extends Test {
override inline def msg: String = "hello"
}
inline def foo: Test = new HelloTest
Output
The first example does not compile and gives an
Implementation restriction: nested inline methods are not supported
Expectation
I would expect the first sample to compile and behave like the second one. The "nested inline" error seems to be a false-positive.
Metadata
Metadata
Assignees
Labels
No labels