Skip to content

Implicit search produces mistyped tree #8976

Closed
@Katrix

Description

@Katrix

Was told to create an issue for this:
https://gitter.im/lampepfl/dotty?at=5ebb35eb8c044c191498af5c

Minimized code

trait Cons[X, Y]

def solve[X, Y](using Cons[X, Y] =:= Cons[1, Cons[2, Y]]) = ()

@main def main = solve

Expectation

My first expectation for the above code was that it wouldn't compile at all. Not sure if that's the correct answer though. I'd also expect that if it did compile, I could supply the types printed by -Xprint:typer, and it would continue to compile.

The code does not compile with Scala 2.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions