File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1114,7 +1114,7 @@ class TypeComparer(initctx: Context) extends ConstraintHandling[AbsentContext] w
11141114 findEnclosingThis(tp.symbol.moduleClass, ctx.owner)
11151115 case tp : TypeRef =>
11161116 val pre1 = liftToThis(tp.prefix)
1117- if (pre1 ne tp.prefix) tp.withPrefix(pre1) else tp
1117+ if (( pre1 ne tp.prefix) && pre1.exists ) tp.withPrefix(pre1) else tp
11181118 case tp : ThisType if tp.cls.is(Package ) =>
11191119 findEnclosingThis(tp.cls, ctx.owner)
11201120 case tp : AppliedType =>
Original file line number Diff line number Diff line change 1+ class Code {
2+ type Ctx
3+ }
4+ def foo (o0: Code ,o1: Code ) = new Code { type Ctx = o0.Ctx & o1.Ctx }
5+ def foo0 (o0: Code ,o1: Code ): Code { type Ctx = o0.Ctx & o1.Ctx } = foo(o0,o1)
You can’t perform that action at this time.
0 commit comments