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
2020 | f0(throw ex)
2121 |
2222 | //ok
23- | f0(identity)
23+ // | f0(identity)
2424 |}""" .stripMargin)
2525 }
2626
@@ -99,7 +99,7 @@ final class ThrownExceptionNotInFunctionTest extends AnyFunSuite with AnalyzerTe
9999 }
100100
101101 test(" Testing multiple arguments" ) {
102- assertErrors(10 ,
102+ assertErrors(26 ,
103103 // language=Scala
104104 """
105105 |object whatever {
@@ -164,7 +164,7 @@ final class ThrownExceptionNotInFunctionTest extends AnyFunSuite with AnalyzerTe
164164 }
165165
166166 test(" Testing constructor invocation" ) {
167- assertErrors(7 ,
167+ assertErrors(9 ,
168168 // language=Scala
169169 s """
170170 |object whatever {
@@ -189,5 +189,21 @@ final class ThrownExceptionNotInFunctionTest extends AnyFunSuite with AnalyzerTe
189189 | """ .stripMargin
190190 )
191191 }
192- }
193192
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