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
dotty version: 0.22.0-RC1 I've also tried dotty nightly but it also failed as well.
type Fib[N <: Int] <: Int = N match { case 0 => 0 case 1 => 1 case _ => Fib[Fib[N - 1] + Fib[N - 2]] } val fib0: Fib[0] = 0 val fib1: Fib[1] = 1 val fib2: Fib[2] = 1 val fib3: Fib[3] = 2 // fails to compile
[error] 21 | val fib3: Fib[3] = 2 [error] | ^ [error] | Found: (2 : Int) [error] | Required: (1 : Int) [error] one error found
compiles successfully
The text was updated successfully, but these errors were encountered:
Fix scala#8449: Add regression test
ee7e329
The code is buggy
import scala.compiletime.ops.int._ object Test { type Fib[N <: Int] <: Int = N match { case 0 => 0 case 1 => 1 case _ => Fib[N - 1] + Fib[N - 2] // removed extra Fib } val fib0: Fib[0] = 0 val fib1: Fib[1] = 1 val fib2: Fib[2] = 1 val fib3: Fib[3] = 2 }
Sorry, something went wrong.
Merge pull request #8451 from dotty-staging/fix-#8449
695b8d1
Fix #8449: Add regression test
Thanks, sorry for the noise.
nicolasstucki
Successfully merging a pull request may close this issue.
dotty version: 0.22.0-RC1
I've also tried dotty nightly but it also failed as well.
minimized code
Compilation output
expectation
compiles successfully
The text was updated successfully, but these errors were encountered: