Skip to content

Type alias to singleton type of named tuple value can not be selected (but just singleton type can) #20439

Closed
@kavedaa

Description

@kavedaa

Compiler version

3.5.0-RC1-bin-20240519-a7ac03e-NIGHTLY

Minimized code

import scala.language.experimental.namedTuples

val bar = (a = 1, b = 2)

type ThatBar = bar.type
val thatBar: ThatBar = bar
val thatBar2: bar.type = bar

def test2 = thatBar.a
def test3 = thatBar2.a

Output

[error] ./tuples.scala:22:13
[error] value a is not a member of ThatBar
[error] def test2 = thatBar.a

Expectation

Successful compilation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:named-tuplesIssues tied to the named tuples feature.itype:bugstat:needs triageEvery issue needs to have an "area" and "itype" label

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions