Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
bishabosha opened this issue Apr 17, 2023 · 0 comments · Fixed by #17301
Closed

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

bishabosha opened this issue Apr 17, 2023 · 0 comments · Fixed by #17301
Assignees
Milestone

Comments

@bishabosha
Copy link
Member

bishabosha commented Apr 17, 2023

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

@bishabosha bishabosha added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Apr 17, 2023
@bishabosha bishabosha added area:refchecks and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Apr 17, 2023
@bishabosha bishabosha changed the title experimental abstract type is not checked when argument of a match type. experimental type selection is not checked when argument of a match type. Apr 17, 2023
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Apr 18, 2023
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Apr 18, 2023
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Apr 25, 2023
@Kordyjan Kordyjan added this to the 3.3.1 milestone Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants