Skip to content

Confusing suggested import involving inline implicit #9685

@mpilquist

Description

@mpilquist

Minimized code

import munit.FunSuite class Example extends FunSuite { 1.asdf }

Output

[error] 4 | 1.asdf [error] | ^^^^^^ [error] |value asdf is not a member of Int, but could be made available as an extension method. [error] | [error] |The following import might make progress towards fixing the problem: [error] | [error] | import munit.Clue.generate [error] | [error] one error found

Expectation

Expected:

[error] 2 | 1.asdf [error] | ^^^^^^ [error] | value asdf is not a member of Int

Dotty 0.27.0-RC1 suggests munit.Clue.generate to fix this issue. The clue method and Clue class are defined as:

inline implicit def generate[T](value: T): Clue[T] = ${ clueImpl('value) } class Clue[+T]( val source: String, val value: T, val valueType: String )

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:reportingError reporting including formatting, implicit suggestions, etcitype:bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions