We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3077e62 + e6aba49 commit 4ae81b9Copy full SHA for 4ae81b9
src/main/scala/shapeless/TypeCheckingExercises.scala
@@ -33,21 +33,10 @@ object TypeCheckingExercises extends FlatSpec with Matchers with exercise.Sectio
33
34
import shapeless.test.illTyped
35
36
- val matchedTypes = Try {
37
- assertTypeError("illTyped { \"val a: Int = 1\" }")
38
- true
39
- } getOrElse {
40
- false
41
- }
+ val matchedTypes = Try { assertTypeError("illTyped { \"val a: Int = 1\" }") }.isSuccess
42
matchedTypes should be(res0)
43
44
- val mismatchedTypes = Try {
45
- assertTypeError("illTyped { \"val a: String = 1\" }")
46
47
48
49
+ val mismatchedTypes = Try { assertTypeError("illTyped { \"val a: String = 1\" }") }.isSuccess
50
mismatchedTypes should be(res1)
51
}
52
-
53
0 commit comments