Skip to content

strictEquality doesn't play well with inline given CanEqual #22420

Open
@road21

Description

@road21

Compiler version

3.3.4, 3.6.3

Minimized code

import scala.language.strictEquality

class Foo

object Foo:
  inline given CanEqual[Foo, Foo] = scala.compiletime.error("foo")

val x = new Foo
val y = new Foo

// summon[CanEqual[Foo, Foo]] // doesn't compile
x == y // compile, and this is strange

Expectation

x == y should not compile

https://scastie.scala-lang.org/D00uWxjoQiecE5zTo6vIZQ

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions