Skip to content

Commit f60f81f

Browse files
committed
Flag dotty deviation for return type which is part of cake.
1 parent ba4fee7 commit f60f81f

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
@@ -779,10 +779,11 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans
779779
// is this purely a type test, e.g. no outer check, no equality tests (used in switch emission)
780780
//def isPureTypeTest = renderCondition(pureTypeTestChecker)
781781

782-
def impliesBinderNonNull(binder: Symbol):Boolean =
782+
def impliesBinderNonNull(binder: Symbol): Boolean =
783783
// @odersky: scalac is able to infer in this method that nonNullImpliedByTestChecker.Result,
784784
// dotty instead infers type projection TreeMakers.this.TypeTestTreeMaker.TypeTestCondStrategy#Result
785785
// which in turn doesn't typecheck in this method. Can you please explain why?
786+
// dotty deviation
786787
renderCondition(nonNullImpliedByTestChecker(binder)).asInstanceOf[Boolean]
787788

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

0 commit comments

Comments
 (0)