summaryrefslogtreecommitdiff
path: root/test/files/neg/saito.scala
blob: bfabb4edf4037efbad085c08a1438ac1795b8e21 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class B {}
class A { self: B =>
    def m(): B = {
        this
    }   
}

object Exec{
    def main(args: Array[String]): Unit = {
        val a: A = new A; // should not be allowed
        val b: B = a.m(); 
    }
}