Skip to content

Commit 157ad25

Browse files
committed
Fix exhaustivity test
1 parent 6ea1a7b commit 157ad25

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

tests/patmat/andtype-opentype-interaction.check

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
27: Pattern Match Exhaustivity: _: Trait & OpenTrait & OpenTrait2, _: Clazz & OpenTrait & OpenTrait2, _: AbstractClass & OpenTrait & OpenTrait2, _: SealedClass & OpenTrait & OpenTrait2
33
31: Pattern Match Exhaustivity: _: Trait & OpenClass
44
35: Pattern Match Exhaustivity: _: Trait & OpenTrait & OpenClass
5-
39: Pattern Match Exhaustivity: _: Trait & OpenClass & (OpenTrait & OpenClass2)
65
43: Pattern Match Exhaustivity: _: Trait & OpenAbstractClass
76
47: Pattern Match Exhaustivity: _: Trait & OpenClass & (OpenTrait & OpenClassSubclass)

tests/patmat/andtype-opentype-interaction.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ object Test {
3737
}
3838

3939
def m2c(s: (T & OpenClass) & (OpenTrait & OpenClass2)) = s match {
40-
case _: Unrelated => ;
40+
case _: Unrelated => ; // OK since scrutinee is the empty type
4141
}
4242

4343
def m3(s: T & OpenAbstractClass) = s match {

0 commit comments

Comments
 (0)