File tree Expand file tree Collapse file tree 3 files changed +14
-6
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -508,7 +508,8 @@ trait Inferencing { this: Typer =>
508508 // found : Int(1)
509509 // required: String
510510 // val y: List[List[String]] = List(List(1))
511- val hasUnreportedErrors = state.reporter.hasUnreportedErrors
511+ if state.reporter.hasUnreportedErrors then return tree
512+
512513 def constraint = state.constraint
513514 type InstantiateQueue = mutable.ListBuffer [(TypeVar , Boolean )]
514515 val toInstantiate = new InstantiateQueue
@@ -521,7 +522,7 @@ trait Inferencing { this: Typer =>
521522 typr.println(i " interpolate non-occurring $tvar in $state in $tree: $tp, fromBelow = ${tvar.hasLowerBound}, $constraint" )
522523 toInstantiate += ((tvar, tvar.hasLowerBound))
523524 }
524- else if ( ! hasUnreportedErrors)
525+ else
525526 if (v.intValue != 0 ) {
526527 typr.println(i " interpolate $tvar in $state in $tree: $tp, fromBelow = ${v.intValue == 1 }, $constraint" )
527528 toInstantiate += ((tvar, v.intValue == 1 ))
Original file line number Diff line number Diff line change 1+ object Kotlin :
2+ def it [T ](using t : T ) = t
3+ def fun [T , U ](fn : T ?=> U )(x : T ): U = fn(using x)
4+
5+ import Kotlin .{fun , it }
6+
7+ def Test = List (1 ).map(fun(it + 1 )) // error
Original file line number Diff line number Diff line change 11-- Error: tests/neg/i9568.scala:13:10 ----------------------------------------------------------------------------------
2213 | blaMonad.foo(bla) // error: diverges
33 | ^
4- |no implicit argument of type => Monad[([_$3] =>> Any) ] was found for parameter ev of method blaMonad in object Test.
5- |I found:
4+ | no implicit argument of type => Monad[F ] was found for parameter ev of method blaMonad in object Test.
5+ | I found:
66 |
7- | Test.blaMonad[Nothing, S](Test.blaMonad[F, S])
7+ | Test.blaMonad[Nothing, S](Test.blaMonad[F, S])
88 |
9- |But method blaMonad in object Test does not match type => Monad[Nothing].
9+ | But method blaMonad in object Test does not match type => Monad[Nothing].
You can’t perform that action at this time.
0 commit comments