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
main
import language.experimental.captureChecking trait Ctx type Context = {*} Ctx trait Type abstract class TypeAccumulator[T](implicit protected val accCtx: Context) { this: {*} TypeAccumulator[T] => def apply(x: T, tp: Type): T def foldOver(x: T, tp: Type): T = ??? } abstract class TypeTraverser(using Context) extends TypeAccumulator[Unit] { def traverse(tp: Type): Unit def apply(x: Unit, tp: Type): Unit = traverse(tp) protected def traverseChildren(tp: Type): Unit = foldOver((), tp) } def main(using ctx: Context): Unit = { val checker = new TypeTraverser { this: {ctx} TypeTraverser => def traverse(tp: Type): Unit = ??? } }
20 | val checker = new TypeTraverser { this: {ctx} TypeTraverser => | ^ | illegal inheritance: anonymous class TypeTraverser {...} inherits conflicting instances of parameterized base class TypeAccumulator. | | Direct basetype: TypeAccumulator[Unit] | Basetype via superclass TypeTraverser: {ctx} TypeAccumulator[Unit] 1 error found
This code should compile.
The text was updated successfully, but these errors were encountered:
I found this when working on #16479. It seems like a caching issue of baseType. Will try to fix it in #16479.
baseType
Sorry, something went wrong.
Fixed by #16479.
Linyxus
No branches or pull requests
Compiler version
main
Minimized code
Output
Expectation
This code should compile.
The text was updated successfully, but these errors were encountered: