File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -970,7 +970,6 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
970970 def isNullable (tp : Type ): Boolean = tp.dealias match
971971 case tp : TypeRef =>
972972 val tpSym = tp.symbol
973- ! tpSym.isPrimitiveValueClass ||
974973 tpSym.isNullableClass
975974 case tp : TermRef =>
976975 // https://scala-lang.org/files/archive/spec/2.13/03-types.html#singleton-types
Original file line number Diff line number Diff line change @@ -1193,7 +1193,8 @@ object Types extends TypeUtils {
11931193 */
11941194 def matches (that : Type )(using Context ): Boolean = {
11951195 record(" matches" )
1196- TypeComparer .matchesType(this , that, relaxed = ! ctx.phase.erasedTypes)
1196+ withoutMode(Mode .SafeNulls )(
1197+ TypeComparer .matchesType(this , that, relaxed = ! ctx.phase.erasedTypes))
11971198 }
11981199
11991200 /** This is the same as `matches` except that it also matches => T with T and
You can’t perform that action at this time.
0 commit comments