Skip to content

Scala 3.3.0-RC2: inline value not considered to be immutable path #16804

Closed
@soronpo

Description

@soronpo

The following compiles in Scala 3.2.2

Compiler version

v3.3.0-RC2

Minimized code

trait Bar[T]
given [T]: Bar[T] with {}
inline def foo[V](inline value: V)(using Bar[value.type]) : Unit = {} //error

Output

(value : V) is not a valid singleton type, since it is not an immutable path
inline def foo[V](inline value: V)(using Bar[value.type]) : Unit = {}

Expectation

No error.

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