Skip to content

Type inference doesn't look broader scope #6672

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
andreaTP opened this issue Jun 12, 2019 · 1 comment
Closed

Type inference doesn't look broader scope #6672

andreaTP opened this issue Jun 12, 2019 · 1 comment

Comments

@andreaTP
Copy link
Contributor

Repro:

trait Y4 {
  def foo = 1
}
trait X4

val z = new Y4 with X4 {}
z match {
  case a: X4 => a.foo
}

trigger:

value foo is not a member of X4

this code compile with scalac 2.12

@smarter
Copy link
Member

smarter commented Jun 12, 2019

Duplicate of #3208

@smarter smarter marked this as a duplicate of #3208 Jun 12, 2019
@smarter smarter closed this as completed Jun 12, 2019
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