Skip to content

Commit ee3ac06

Browse files
committed
Flag dotty deviation for return type which is part of cake.
1 parent 81816c3 commit ee3ac06

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/dotty/tools/dotc/transform/PatternMatcher.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,10 +776,11 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans
776776
// is this purely a type test, e.g. no outer check, no equality tests (used in switch emission)
777777
//def isPureTypeTest = renderCondition(pureTypeTestChecker)
778778

779-
def impliesBinderNonNull(binder: Symbol):Boolean =
779+
def impliesBinderNonNull(binder: Symbol): Boolean =
780780
// @odersky: scalac is able to infer in this method that nonNullImpliedByTestChecker.Result,
781781
// dotty instead infers type projection TreeMakers.this.TypeTestTreeMaker.TypeTestCondStrategy#Result
782782
// which in turn doesn't typecheck in this method. Can you please explain why?
783+
// dotty deviation
783784
renderCondition(nonNullImpliedByTestChecker(binder)).asInstanceOf[Boolean]
784785

785786
override def toString = "TT"+((expectedTp, testedBinder.name, nextBinderTp))

0 commit comments

Comments
 (0)