blob: 2456925e62c66f8b7ac59cd3fbf4061e1fdd2c97 (
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
27
|
/** Test that constructor operations are reordered correctly. */
class Outer {
object global {
val x = 10;
}
class X extends AnyRef with M1 {
// TODO NEEDS MANUAL CHANGE (early initializers)
// BEGIN copied early initializers
val outer = Outer.this
// END copied early initializers
}
trait M1 { self: X =>
Console.println(global.x);
Console.println(outer.global.x);
}
}
object Test extends AnyRef with App {
val o = new Outer;
new o.X;
}
|