File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
compiler/src/dotty/tools/dotc/transform
tests/neg-custom-args/isInstanceOf Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ object Checkable {
80
80
def replaceX (implicit ctx : Context ) = new TypeMap {
81
81
def apply (tp : Type ) = tp match {
82
82
case tref : TypeRef
83
- if ! tref.typeSymbol.isClass && tref.symbol.is( Case ) =>
83
+ if isPatternTypeSymbol( tref.typeSymbol) =>
84
84
if (variance == 1 ) tref.info.hiBound
85
85
else if (variance == - 1 ) tref.info.loBound
86
86
else OrType (defn.AnyType , defn.NothingType )
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ object Test {
2
2
trait Marker
3
3
def foo [T ](x : T ) = x match {
4
4
case _ : (T & Marker ) => // no warning
5
- // case _: T with Marker => // scalac emits a warning
5
+ case _ : T with Marker => // scalac emits a warning
6
6
case _ =>
7
7
}
8
8
You can’t perform that action at this time.
0 commit comments