We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
scala> class Foo[T] defined class Foo scala> def foo[T](): Foo[T] = new Foo foo: [T]()Foo[T]
is working, however, when we add a refinement, it doesn't:
scala> def bar[T](): Foo[T] { type U } = new Foo { type U = Int } <console>:11: error: type mismatch; found : Foo[Nothing]{type U = Int} required: Foo[T]{type U} def bar[T](): Foo[T] { type U } = new Foo { type U = Int }
as a workaround, it is needed to specify the type explicitly:
scala> def baz[T](): Foo[T] { type U } = new Foo [T] { type U = Int } baz: [T]()Foo[T]{type U}
(this issue was found while working on #9361)
The text was updated successfully, but these errors were encountered:
Imported From: https://issues.scala-lang.org/browse/SI-9775?orig=1 Reporter: Sarunas Valaskevicius (rakatan) Affected Versions: 2.11.7 See #9361
Sorry, something went wrong.
No branches or pull requests
is working, however, when we add a refinement, it doesn't:
as a workaround, it is needed to specify the type explicitly:
(this issue was found while working on #9361)
The text was updated successfully, but these errors were encountered: