File tree 3 files changed +4
-2
lines changed
compiler/src/dotty/tools/dotc
3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -314,7 +314,7 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
314
314
// Precondition: !isSubType(tp1, tp2) && !isSubType(tp2, tp1).
315
315
if (! ctx.explicitNulls && (tp1.isNullType || tp2.isNullType)) {
316
316
// Since projections of types don't include null, intersection with null is empty.
317
- return Empty
317
+ Empty
318
318
}
319
319
else {
320
320
val res = ctx.typeComparer.provablyDisjoint(tp1, tp2)
Original file line number Diff line number Diff line change @@ -2832,7 +2832,8 @@ class Typer extends Namer
2832
2832
tree.tpe <:< wildApprox(pt)
2833
2833
val errorCount = ctx.reporter.errorCount
2834
2834
val inlined = Inliner .inlineCall(tree)
2835
- if (errorCount == ctx.reporter.errorCount) readaptSimplified(inlined) else inlined
2835
+ if ((inlined ne tree) && errorCount == ctx.reporter.errorCount) readaptSimplified(inlined)
2836
+ else inlined
2836
2837
}
2837
2838
else if (tree.symbol.isScala2Macro &&
2838
2839
// raw and s are eliminated by the StringInterpolatorOpt phase
Original file line number Diff line number Diff line change
1
+ def f : Int = implicitly : Int // error
You can’t perform that action at this time.
0 commit comments