Skip to content

Problem with typing of ValDef with anonymous class #1743

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
liufengyun opened this issue Nov 25, 2016 · 1 comment
Closed

Problem with typing of ValDef with anonymous class #1743

liufengyun opened this issue Nov 25, 2016 · 1 comment

Comments

@liufengyun
Copy link
Contributor

Following code fails to type check in dotc, which is the second issue reported in #1707:

object DepBug {
  val dep = new {
    val a = 3
    val b = 4
  }

  dep.a + dep.b
}
@smarter
Copy link
Member

smarter commented Jan 11, 2018

This is intended. Type inference does not produce structural types in Dotty.

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