Skip to content

Commit 8266a70

Browse files
authored
Merge pull request #15621 from dwijnand/cut/handleOverflow
Cut handleOverflow in isFullyDefined, dead code
2 parents 18f2c0e + 43f7cd8 commit 8266a70

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

compiler/src/dotty/tools/dotc/typer/Inferencing.scala

+2-5
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,9 @@ object Inferencing {
2828
* but only if the overall result of `isFullyDefined` is `true`.
2929
* Variables that are successfully minimized do not count as uninstantiated.
3030
*/
31-
def isFullyDefined(tp: Type, force: ForceDegree.Value, handleOverflow: Boolean = false)(using Context): Boolean = {
31+
def isFullyDefined(tp: Type, force: ForceDegree.Value)(using Context): Boolean = {
3232
val nestedCtx = ctx.fresh.setNewTyperState()
33-
val result =
34-
try new IsFullyDefinedAccumulator(force)(using nestedCtx).process(tp)
35-
catch case ex: RecursionOverflow if handleOverflow =>
36-
false // can happen for programs with illegal recusions, e.g. neg/recursive-lower-constraint.scala
33+
val result = new IsFullyDefinedAccumulator(force)(using nestedCtx).process(tp)
3734
if (result) nestedCtx.typerState.commit()
3835
result
3936
}

0 commit comments

Comments
 (0)