File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
tests/neg-custom-args/fatal-warnings Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,16 @@ class i13011 {
66
77 lazy val simple3 : String = if true then this .simple3 else " a" // error
88
9- lazy val simple4 : String = identity(this .simple4) // error
9+ def firstDigitIsEven (n : Int ): Boolean = if n % 10 == n then n % 2 == 0 else firstDigitIsEven(n / 10 )
10+
11+ lazy val simple4 : String = if firstDigitIsEven(22 ) then this .simple4 else " a" // error
12+
13+ lazy val simple5 : String = identity(this .simple5) // error
1014
11- lazy val simple5 : String = { // error
12- this .simple5
15+ lazy val simple6 : String = { // error
16+ this .simple6
1317 " aa"
1418 }
1519
16- lazy val simple6 : Function0 [Any ] = () => this .simple6 // Ok
20+ lazy val simple7 : Function0 [Any ] = () => this .simple7 // Ok
1721}
You can’t perform that action at this time.
0 commit comments