Skip to content

Cut handleOverflow in isFullyDefined, dead code #15621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions compiler/src/dotty/tools/dotc/typer/Inferencing.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,9 @@ object Inferencing {
* but only if the overall result of `isFullyDefined` is `true`.
* Variables that are successfully minimized do not count as uninstantiated.
*/
def isFullyDefined(tp: Type, force: ForceDegree.Value, handleOverflow: Boolean = false)(using Context): Boolean = {
def isFullyDefined(tp: Type, force: ForceDegree.Value)(using Context): Boolean = {
val nestedCtx = ctx.fresh.setNewTyperState()
val result =
try new IsFullyDefinedAccumulator(force)(using nestedCtx).process(tp)
catch case ex: RecursionOverflow if handleOverflow =>
false // can happen for programs with illegal recusions, e.g. neg/recursive-lower-constraint.scala
val result = new IsFullyDefinedAccumulator(force)(using nestedCtx).process(tp)
if (result) nestedCtx.typerState.commit()
result
}
Expand Down