Closed
Description
Under Scala2 mode this does not compile:
import scala.reflect.Selectable.reflectiveSelectable
class Test {
def test(x: { def get(): Int }): Int = x.get
// ^
// found: () => Int
// required: Int
}
This is inconsistent with non structural types and a breaking change with respect to Scala2
def foo(): Int = 1
val x: Int = foo // OK under Scala2 mode