forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathi19019.check
37 lines (36 loc) · 1.49 KB
/
i19019.check
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
28
29
30
31
32
33
34
35
36
[[syntax trees at end of typer]] // tests/printing/i19019.scala
package <empty> {
final lazy module val ObjectWithSelf: ObjectWithSelf = new ObjectWithSelf()
final module class ObjectWithSelf() extends Object() {
this: ObjectWithSelf.type =>
final lazy module val StaticObjectNoSelf: ObjectWithSelf.StaticObjectNoSelf
= new ObjectWithSelf.StaticObjectNoSelf()
final module class StaticObjectNoSelf() extends Object() {
this: ObjectWithSelf.StaticObjectNoSelf.type =>
def foo: Any = this
}
final lazy module val StaticObjectWithSelf:
ObjectWithSelf.StaticObjectWithSelf =
new ObjectWithSelf.StaticObjectWithSelf()
final module class StaticObjectWithSelf() extends Object() {
self: ObjectWithSelf.StaticObjectWithSelf.type =>
def foo: Any = self
}
class Container() extends Object() {
final lazy module val NonStaticObjectNoSelf:
Container.this.NonStaticObjectNoSelf =
new Container.this.NonStaticObjectNoSelf()
final module class NonStaticObjectNoSelf() extends Object() {
this: Container.this.NonStaticObjectNoSelf.type =>
def foo: Any = this
}
final lazy module val NonStaticObjectWithSelf:
Container.this.NonStaticObjectWithSelf =
new Container.this.NonStaticObjectWithSelf()
final module class NonStaticObjectWithSelf() extends Object() {
self: Container.this.NonStaticObjectWithSelf.type =>
def foo: Any = self
}
}
}
}