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 {
8080 def replaceX (implicit ctx : Context ) = new TypeMap {
8181 def apply (tp : Type ) = tp match {
8282 case tref : TypeRef
83- if ! tref.typeSymbol.isClass && tref.symbol.is( Case ) =>
83+ if isPatternTypeSymbol( tref.typeSymbol) =>
8484 if (variance == 1 ) tref.info.hiBound
8585 else if (variance == - 1 ) tref.info.loBound
8686 else OrType (defn.AnyType , defn.NothingType )
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ object Test {
22 trait Marker
33 def foo [T ](x : T ) = x match {
44 case _ : (T & Marker ) => // no warning
5- // case _: T with Marker => // scalac emits a warning
5+ case _ : T with Marker => // scalac emits a warning
66 case _ =>
77 }
88
You can’t perform that action at this time.
0 commit comments