aboutsummaryrefslogblamecommitdiff
path: root/tests/untried/neg/saito.scala
blob: b4fcd598e440fb9d72699df94730615c95f04a81 (plain) (tree)
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();
    }
}