blob: 17ff684833d261baa9f080f4e37fa6817fd92b97 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
class Foo (x: AnyRef) {
def this() = {
this(new { } ) // okay
}
}
class Blerg (x: AnyRef) {
def this() = {
this(new { class Bar { println(Bar.this); new { println(Bar.this) } }; new Bar } ) // okay
}
}
class Outer {
class Inner (x: AnyRef) {
def this() = {
this(new { class Bar { println(Bar.this); new { println(Bar.this) } }; new Bar } ) // okay
}
def this(x: Boolean) = {
this(new { println(Outer.this) } ) // okay
}
}
}
|