Skip to content

Fix #9631: handle F-bounds in type expansion #9729

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

Closed
wants to merge 3 commits into from

Conversation

liufengyun
Copy link
Contributor

Fix #9631: handle F-bounds in type expansion

@liufengyun
Copy link
Contributor Author

@OlivierBlanvillain Could you have a look if the change makes sense for match types?

@smarter
Copy link
Member

smarter commented Sep 13, 2020

A similar issue (same symptoms) has just been opened: #9782 and it doesn't seem to be fixed by this PR. The interesting part of the stacktrace is:

        [...]
        at dotty.tools.dotc.core.Types$TypeAccumulator.foldOver(Types.scala:5434)
        at dotty.tools.dotc.typer.Inferencing$accu$1$.apply(Inferencing.scala:408)
        at dotty.tools.dotc.typer.Inferencing$accu$1$.apply(Inferencing.scala:400)
        at dotty.tools.dotc.core.Types$TypeAccumulator.foldOver(Types.scala:5465)
        at dotty.tools.dotc.typer.Inferencing$accu$1$.apply(Inferencing.scala:408)
        at dotty.tools.dotc.typer.Inferencing$.traverse$1(Inferencing.scala:424)
        at dotty.tools.dotc.typer.Inferencing$.propagate$4$$anonfun$3(Inferencing.scala:434)
        at dotty.runtime.function.JProcedure2.apply(JProcedure2.java:15)
        at dotty.runtime.function.JProcedure2.apply(JProcedure2.java:10)
        at dotty.tools.dotc.util.SimpleIdentityMap$Map1.foreachBinding(SimpleIdentityMap.scala:61)
        at dotty.tools.dotc.typer.Inferencing$.propagate$1(Inferencing.scala:436)
        at dotty.tools.dotc.typer.Inferencing$.dotty$tools$dotc$typer$Inferencing$$$variances(Inferencing.scala:441)
        at dotty.tools.dotc.typer.Inferencing$.maximizeType(Inferencing.scala:352)
        at dotty.tools.dotc.transform.TypeTestsCasts$.typeArgsTrivial$1(TypeTestsCasts.scala:119)
        at dotty.tools.dotc.transform.TypeTestsCasts$.recur$1(TypeTestsCasts.scala:155)
        at dotty.tools.dotc.transform.TypeTestsCasts$.checkable(TypeTestsCasts.scala:164)
        at dotty.tools.dotc.transform.TypeTestsCasts$.interceptWith$2(TypeTestsCasts.scala:351)
        at dotty.tools.dotc.transform.TypeTestsCasts$.op$proxy3$1(TypeTestsCasts.scala:367)
        at dotty.tools.dotc.transform.TypeTestsCasts$.interceptTypeApply(TypeTestsCasts.scala:368)
        at dotty.tools.dotc.transform.Erasure$Typer.typedTypeApply(Erasure.scala:751)

@liufengyun
Copy link
Contributor Author

This suggests another place where we need to improve the handling of F-bounded types. I'll propose a fix in another PR.

@liufengyun
Copy link
Contributor Author

Superseded by #9816

@liufengyun liufengyun closed this Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recursion limit exceeded (F-bounded type and sealed pattern match)
3 participants