We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb73c3f commit 18f66ebCopy full SHA for 18f66eb
tests/init/neg/soundness1.scala
@@ -1,7 +1,29 @@
1
class A(b: B) {
2
- val b2 = new B(this) // error
+ val b2 = new B(this)
3
}
4
5
class B(a: A) {
6
- val a2 = new A(this) // error
+ val a2 = new A(this)
7
8
+
9
+object Test2:
10
+ class A(b: B) {
11
12
+ val c = b2.a2
13
+ }
14
15
+ class B(a: A) {
16
17
+ val c = a2.b2
18
19
20
+object Test3:
21
22
+ println(b.a2) // error
23
24
25
26
27
+ println(a.b2) // error
28
29
tests/init/neg/soundness2.scala
@@ -1,3 +1,4 @@
class C(c: C) {
- val c2 = new C(this) // error
+ val d = c.c2 // error
+ val c2 = new C(this)
0 commit comments