Skip to content

Commit 6a6b95d

Browse files
committed
Merge pull request scala#4363 from retronym/topic/t8575-check-init
SI-8575 Avoid use of unitialized field in a test.
2 parents 198c201 + ab3f78a commit 6a6b95d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/files/run/t8575.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ object Test extends TypeMember {
2121
// works if replaced by type X = E[A with B with C]
2222
type X = E[F with C]
2323

24-
val value = new E[F with C]
24+
def value = new E[F with C]
2525

2626
// This call passes, since it invokes consume(E): Unit
27-
consume(value)
2827
def consume(x: X) {}
2928

3029
def main(args: Array[String]) {
31-
30+
consume(value)
3231
}
3332
}

0 commit comments

Comments
 (0)