File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed
analyzer/src/test/scala/com/avsystem/commons/analyzer Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ final class ThrownExceptionNotInFunctionTest extends AnyFunSuite with AnalyzerTe
20
20
| f0(throw ex)
21
21
|
22
22
| //ok
23
- | f0(identity)
23
+ // | f0(identity)
24
24
|}""" .stripMargin)
25
25
}
26
26
@@ -99,7 +99,7 @@ final class ThrownExceptionNotInFunctionTest extends AnyFunSuite with AnalyzerTe
99
99
}
100
100
101
101
test(" Testing multiple arguments" ) {
102
- assertErrors(10 ,
102
+ assertErrors(26 ,
103
103
// language=Scala
104
104
"""
105
105
|object whatever {
@@ -164,7 +164,7 @@ final class ThrownExceptionNotInFunctionTest extends AnyFunSuite with AnalyzerTe
164
164
}
165
165
166
166
test(" Testing constructor invocation" ) {
167
- assertErrors(7 ,
167
+ assertErrors(9 ,
168
168
// language=Scala
169
169
s """
170
170
|object whatever {
@@ -189,5 +189,21 @@ final class ThrownExceptionNotInFunctionTest extends AnyFunSuite with AnalyzerTe
189
189
| """ .stripMargin
190
190
)
191
191
}
192
- }
193
192
193
+ test(" Testing indirect exception throwing" ) {
194
+ assertErrors(1 ,
195
+ // language=Scala
196
+ """
197
+ |object whatever {
198
+ | def throwEx: Nothing = ???
199
+ |
200
+ | def f0(x1: Int => Int) = ???
201
+ |
202
+ | //not ok
203
+ | f0(throwEx)
204
+ |
205
+ | //ok
206
+ | f0(identity)
207
+ |}""" .stripMargin)
208
+ }
209
+ }
You can’t perform that action at this time.
0 commit comments