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
The following code doesn't compile, but should:
package bug import reflect.Selectable.reflectiveSelectable object options2 { type Option[T] = { def isEmpty: Boolean } type None[T] = Option[T] //Succeeds: val none : () => Option[Nothing] = () => new { def isEmpty = true } //Fails. Note I'm not even using T! val mkNone0 : [T] => () => Option[Nothing] = [T] => () => new { def isEmpty = true } //Fails. That'd be real. val mkNone : [T] => () => Option[T] = [T] => () => new { def isEmpty = true } }
Should compile.
[error] -- [E007] Type Mismatch Error: /Users/pgiarrusso/git/Coq/silr-dot/code/Bug.scala:16:3 [error] 16 | } [error] | ^ [error] | Found: Object with PolyFunction {...} [error] | Required: PolyFunction{apply: [T](): bug.options2.Option[Nothing]} [error] -- [E007] Type Mismatch Error: /Users/pgiarrusso/git/Coq/silr-dot/code/Bug.scala:20:3 [error] 20 | } [error] | ^ [error] | Found: Object with PolyFunction {...} [error] | Required: PolyFunction{apply: [T](): bug.options2.Option[T]} [error] two errors found
With version 0.20.0-RC1.
The text was updated successfully, but these errors were encountered:
The expectation of this is that it compiles:
//> using scala 3.3.1-RC1-bin-20230510-d6c643c-NIGHTLY import reflect.Selectable.reflectiveSelectable object options2 { type Option[T] = { def isEmpty: Boolean } type None[T] = Option[T] val none: () => Option[Nothing] = () => new { def isEmpty = true } val mkNone0: [T] => () => Option[Nothing] = [T] => () => new { def isEmpty = true } val mkNone: [T] => () => Option[T] = [T] => () => new { def isEmpty = true } }
This now does compile as expected, so I'll go ahead and close. Please report back or reopen if I'm misunderstanding something here.
Sorry, something went wrong.
test: add in regression test for scala#7653
77a44df
test: add in regression test for #7653 (#17474)
8b15eb9
Closes #7653
Successfully merging a pull request may close this issue.
Uh oh!
There was an error while loading. Please reload this page.
minimized code
The following code doesn't compile, but should:
expectation
Should compile.
actual
With version 0.20.0-RC1.
The text was updated successfully, but these errors were encountered: