Skip to content

Commit 1790ef1

Browse files
committed
Fix test: synthetic apply is now transparent
1 parent 28cb972 commit 1790ef1

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

tests/init/neg/cycle-structure.check

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
-- Error: tests/init/neg/cycle-structure.scala:9:14 --------------------------------------------------------------------
2-
9 | val x = A(this) // error
3-
| ^^^^
4-
| Cannot prove that the value is fully initialized. May only use initialized value as arguments.
5-
-- Error: tests/init/neg/cycle-structure.scala:3:14 --------------------------------------------------------------------
6-
3 | val x = B(this) // error
7-
| ^^^^
8-
| Cannot prove that the value is fully initialized. May only use initialized value as arguments.
1+
-- Error: tests/init/neg/cycle-structure.scala:2:15 --------------------------------------------------------------------
2+
2 | val x1 = b.x // error
3+
| ^^^
4+
| Access field A.this.b.x on a value with an unknown initialization status. Calling trace:
5+
| -> val x = A(this) [ cycle-structure.scala:9 ]
6+
| -> case class A(b: B) { [ cycle-structure.scala:1 ]
7+
-- Error: tests/init/neg/cycle-structure.scala:8:15 --------------------------------------------------------------------
8+
8 | val x1 = a.x // error
9+
| ^^^
10+
| Access field B.this.a.x on a value with an unknown initialization status. Calling trace:
11+
| -> val x = A(this) [ cycle-structure.scala:9 ]
12+
| -> case class A(b: B) { [ cycle-structure.scala:1 ]
13+
| -> val x = B(this) [ cycle-structure.scala:3 ]
14+
| -> case class B(a: A) { [ cycle-structure.scala:7 ]

tests/init/neg/cycle-structure.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
case class A(b: B) {
2-
val x1 = b.x
3-
val x = B(this) // error
2+
val x1 = b.x // error
3+
val x = B(this)
44
val y = x.a
55
}
66

77
case class B(a: A) {
8-
val x1 = a.x
9-
val x = A(this) // error
8+
val x1 = a.x // error
9+
val x = A(this)
1010
val h = x.b
1111
}

0 commit comments

Comments
 (0)