Skip to content

Intersection of by-name and singleton type as result of application #3901

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
gsps opened this issue Jan 24, 2018 · 0 comments
Closed

Intersection of by-name and singleton type as result of application #3901

gsps opened this issue Jan 24, 2018 · 0 comments

Comments

@gsps
Copy link
Contributor

gsps commented Jan 24, 2018

The following code produces an error complaining about cond.type not being stable. In the subsequent function application we nonetheless try to compute the intersection of non-value type => Boolean and Singleton, which is caught by an assertion in AndType.

object Crash {
  def f(cond: => Boolean): cond.type = ???
  f(true)
}
odersky added a commit to dotty-staging/dotty that referenced this issue Jan 26, 2018
liufengyun added a commit that referenced this issue Jan 27, 2018
Fix #3901: Survive parameter dependencies on by-name parameters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants