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 9aae65c commit 1debee6Copy full SHA for 1debee6
compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala
@@ -40,7 +40,9 @@ object ProtoTypes {
40
/** Test compatibility after normalization in a fresh typerstate. */
41
def normalizedCompatible(tp: Type, pt: Type)(implicit ctx: Context) = {
42
val nestedCtx = ctx.fresh.setExploreTyperState
43
- isCompatible(normalize(tp, pt)(nestedCtx), pt)(nestedCtx)
+ val normTp = normalize(tp, pt)(nestedCtx)
44
+ isCompatible(normTp, pt)(nestedCtx) ||
45
+ pt.isRef(defn.UnitClass) && normTp.isParameterless
46
}
47
48
private def disregardProto(pt: Type)(implicit ctx: Context): Boolean = pt.dealias match {
0 commit comments