File tree 2 files changed +31
-0
lines changed
utest/shared/src/test/scala-2.12/test/utest
2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -971,6 +971,11 @@ Changelog
971
971
- Using uTest with ` fork in Test := true ` in SBT no longer gives an incorrect
972
972
results summmary
973
973
974
+ - Fix problem with lazy vals in test blocks crashing the compiler
975
+ [ #67 ] ( https://github.com/lihaoyi/utest/issues/67 ) . Note that the issue is only
976
+ fixed on 2.12.3, and not on Scala 2.10.x or 2.11.x.
977
+
978
+
974
979
0.4.8
975
980
-----
976
981
Original file line number Diff line number Diff line change
1
+ package test .utest
2
+
3
+ import utest ._
4
+
5
+ object What {
6
+ def imported = 2
7
+ }
8
+
9
+ object LazyValTest extends TestSuite {
10
+ override def tests = TestSuite {
11
+ import What ._
12
+ lazy val subj = imported
13
+ ' test {
14
+ lazy val y = " hello"
15
+ ' inner {
16
+ lazy val z = " world"
17
+ val res = y * imported + z
18
+ assert(res == " hellohelloworld" )
19
+ res
20
+ }
21
+ ' inner2 {
22
+ lazy val terminalLazyVal = y
23
+ }
24
+ }
25
+ }
26
+ }
You can’t perform that action at this time.
0 commit comments