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.
1 parent 61a16f5 commit 8ae5c19Copy full SHA for 8ae5c19
test/junit/scala/reflect/internal/TypesTest.scala
@@ -32,4 +32,12 @@ class TypesTest {
32
val uniquelyNarrowed2 = refinedType(boolWithString1narrow2 :: Nil, NoSymbol)
33
assert(uniquelyNarrowed1 =:= uniquelyNarrowed2)
34
}
35
+
36
+ @Test
37
+ def testLub(): Unit = {
38
+ assert(lub(List(LiteralType(Constant(0)), LiteralType(Constant(1)))) =:= IntTpe)
39
+ assert(lub(List(LiteralType(Constant(1)), LiteralType(Constant(1)))) =:= LiteralType(Constant(1)))
40
+ assert(lub(List(LiteralType(Constant("a")), LiteralType(Constant("b")))) =:= StringTpe)
41
+ assert(lub(List(LiteralType(Constant("a")), LiteralType(Constant("a")))) =:= LiteralType(Constant("a")))
42
+ }
43
0 commit comments