Skip to content

Ycheck fails with bad interaction between inline parameters and singleton types #11163

Closed
@nicolasstucki

Description

@nicolasstucki

Minimized code

inline def summonA[T](using x: T): x.type = x
inline def summonB[T](using inline x: T): x.type = x
inline def summonC[T](using inline x: T): T = x

trait Foo:
  def f: Int = 9

def test(using Foo) =
  summonA[Foo].f
  summonB[Foo].f
  summonC[Foo].f
  ()

Output

10 |  summonB[Foo].f
   |  ^^^^^^^^^^^^^^
   |  value f is not a member of T

Expectation

summonB[Foo].f should compile

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