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 {
6
6
7
7
lazy val simple3 : String = if true then this .simple3 else " a" // error
8
8
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
10
14
11
- lazy val simple5 : String = { // error
12
- this .simple5
15
+ lazy val simple6 : String = { // error
16
+ this .simple6
13
17
" aa"
14
18
}
15
19
16
- lazy val simple6 : Function0 [Any ] = () => this .simple6 // Ok
20
+ lazy val simple7 : Function0 [Any ] = () => this .simple7 // Ok
17
21
}
You can’t perform that action at this time.
0 commit comments