We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
This example from tests/pos/t1569a.scala works:
tests/pos/t1569a.scala
object Bug2 { class C { type T } class D extends C { type T = String } def foo(x: Int)(y: C)(z: y.T): Unit = {} foo(3)(new D)("hello") }
But replacing new D by new D {} fails with:
new D
new D {}
tests/pos/t1569a.scala:11: error: type mismatch: found : String("hello") required: Bug2.C#T foo(3)(new D { })("hello") ^ one error found
Whether the expected type of the parameter is used or not is determined by Typer#ensureNoLocalRefs
Typer#ensureNoLocalRefs
The text was updated successfully, but these errors were encountered:
Here's another example that fails with dotty and works with scala2:
class Foo { type A } object Test { def foo(foo: Foo)(y: foo.A) = y foo(new Foo { type A = Int })(1) }
Sorry, something went wrong.
Add original test case of scala#360
cc2a979
8dba911
4f15021
Merge pull request scala#360 from scala/backport-lts-3.3-23005
fd2a29d
Backport "Call dealias after stripping type variables for tupleElementTypesUpTo" to 3.3 LTS
smarter
No branches or pull requests
This example from
tests/pos/t1569a.scala
works:But replacing
new D
bynew D {}
fails with:Whether the expected type of the parameter is used or not is determined by
Typer#ensureNoLocalRefs
The text was updated successfully, but these errors were encountered: