Skip to content

Dotty does not handle correctly raw types in parent position coming from classfiles. #3298

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
smarter opened this issue Oct 10, 2017 · 1 comment

Comments

@smarter
Copy link
Member

smarter commented Oct 10, 2017

As reported in #3273 (comment):

tail /tmp/Test.java sandbox/client.scala ;  javac -d /tmp /tmp/Test.java && scalac -cp /tmp sandbox/client.scala && ./bin/dotc -classpath /tmp sandbox/client.scala
==> /tmp/Test.java <==
class Test {
	static abstract class A<X> extends B {
		abstract B foo();
	}
	static abstract class B<X> {
		abstract A bar();
	}
}

==> sandbox/client.scala <==
class Client {
  val a = (_: Test.A[AnyRef]).foo
  val b = (_: Test.B[AnyRef]).bar
  def test(x: Test.A[AnyRef]): Test.B[_] = x
}
-- [E007] Type Mismatch Error: sandbox/client.scala:4:43 -----------------------
4 |  def test(x: Test.A[AnyRef]): Test.B[_] = x
  |                                           ^
  |                                           found:    Test.A[AnyRef](x)
  |                                           required: Test.B[_]
  |

one error found
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