blob: 964df7590e3ccdcdcfda4c561ed65a7cb98091bf (
plain) (
tree)
|
|
import scala.language.{ reflectiveCalls }
class Stuff {
def zoop(p: Any{def &(q: Int): Int}) = p & 7
def floop = new { def & = "Hello" }
assert((floop.&) == "Hello")
assert(zoop(10) == 2)
}
object Test extends dotty.runtime.LegacyApp {
new Stuff
}
|