blob: 81917789c8d45ec69a8c7869f627eeaacbc4880e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
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 App {
new Stuff
}
|