Skip to content

experimental type selection is not checked when argument of a match type. #17292

Closed
@bishabosha

Description

@bishabosha

Compiler version

Scala 3.3.0-RC3

Minimized code

import annotation.experimental

class Foo { @experimental type Bar = (Int, String) }

val f: Foo = Foo()

def g: Tuple.Elem[f.Bar, 0] = ???

Output

// defined class Foo
val f: Foo = Foo@6921cfa
def g: Int

Expectation

There should be an error that we accessed f.Bar. This is mostly going to effect macros that compile against newly added experimental types, such as the proposed Mirror.Product.MirroredElementHasDefaults

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions