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 f5dde7f commit bebf94aCopy full SHA for bebf94a
compiler/src/dotty/tools/dotc/ast/TreeInfo.scala
@@ -907,7 +907,11 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
907
def unapply(tree: tpd.TypeApply)(using Context): Option[tpd.Tree] = tree match
908
case TypeApply(Select(qual: RefTree, nme.asInstanceOfPM), arg :: Nil) =>
909
arg.tpe match
910
- case AndType(ref, _) if qual.tpe eq ref => Some(qual)
+ case AndType(ref, nn1) if qual.tpe eq ref =>
911
+ qual.tpe.widen match
912
+ case OrNull(nn2) if nn1 eq nn2 =>
913
+ Some(qual)
914
+ case _ => None
915
case _ => None
916
917
end AssertNotNull
0 commit comments