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
1114
1114
findEnclosingThis(tp.symbol.moduleClass, ctx.owner)
1115
1115
case tp : TypeRef =>
1116
1116
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
1118
1118
case tp : ThisType if tp.cls.is(Package ) =>
1119
1119
findEnclosingThis(tp.cls, ctx.owner)
1120
1120
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