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

Navigate the AST within AnnotatedType and ImportType #13834

Merged
merged 2 commits into from Oct 29, 2021

Conversation

tgodzik
Copy link
Contributor

@tgodzik tgodzik commented Oct 27, 2021

Related to #13624

This is the second part of #13831


@Test def i13624_annotType: Unit =
code"""|class MyAnnotation extends annotation.StaticAnnotation
|val x = 1: @MyAnnot${m1}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering how this is going to work in some more complex cases:

  1. If the used annotation is not visible in the current scope e.g.
val x = 1: @Foo.MyAnnot${m1}
  1. If you chain more than one annotations, e.g.
1: @MyAnnotation1 @MyAnnot${m1}

or

type X = Int @MyAnnotation1 @MyAnnot${m1}
  1. If annotations are nested, e.g.
1: @MyAnnotation2("abc": @MyAnnot${m1})

Could you add some tests for that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added! And surprisingly all of them work 😅

@tgodzik tgodzik requested a review from prolativ October 28, 2021 16:54
@tgodzik tgodzik merged commit 39be9da into scala:master Oct 29, 2021
@tgodzik tgodzik deleted the fix-postfix branch October 29, 2021 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants