Skip to content

Infinite recursion in Typer.checkAccessible #39

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
samuelgruetter opened this issue Mar 3, 2014 · 0 comments
Closed

Infinite recursion in Typer.checkAccessible #39

samuelgruetter opened this issue Mar 3, 2014 · 0 comments

Comments

@samuelgruetter
Copy link
Contributor

In the following example, the Typer runs into an infinite recursion (StackOverflowError):

object test534 {

  trait B {
    type D <: { type T }
    def d: D
  }

  val bc: B = new B {
    def d: D = ???
  }

  val d: bc.D = bc.d

  // infinite loop in Typer
  val asT: d.T = ???

}
odersky added a commit to odersky/dotty that referenced this issue Mar 4, 2014
Two fixes:
1) Avoid the infinite recursion in checkAccessible if the accessibility check fails.
2) Make accessibility succeed for the test, and in general if the target denotation does not have a symbol.

Added original test in pos and a negative test which makes accessibility fail.
@odersky odersky closed this as completed Mar 4, 2014
WojciechMazur pushed a commit to WojciechMazur/dotty that referenced this issue Mar 19, 2025
Backport "Drop support for old experimental in community-build" to 3.3 LTS
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

No branches or pull requests

2 participants