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

Lift artificial restrictions on ConstantAnnotations #9379

Merged
merged 3 commits into from Dec 17, 2020
Merged

Commits on Dec 17, 2020

  1. Typecheck ConstantAnnotations normally, not like Java annotations

    So far we handled ConstantAnnotations the same as Java annotations.
    Instead of typechecking the full parse tree `Apply(New(annot), args)`,
    the `New` and the individual `args` were typed individually. This is
    needed for Java annotations as there's no corresponding constructor.
    But for ConstantAnnotations we can just type check them normally and
    then extract the constants.
    lrytz committed Dec 17, 2020
    Copy the full SHA
    0e4ca7e View commit details
    Browse the repository at this point in the history
  2. Don't re-run typer on already typed ConstantAnnotation

    When extracting constants from an already typed ConstantAnnotation,
    don't call the typer again.
    lrytz committed Dec 17, 2020
    Copy the full SHA
    e346b8c View commit details
    Browse the repository at this point in the history
  3. Better error for Java annotation nested in a Scala ConstantAnnotation

    Java supports nested annotations as constant annotation arguments, but
    Scala's ConstantAnnotation doesn't. Better error message for this case.
    lrytz committed Dec 17, 2020
    Copy the full SHA
    a6bf012 View commit details
    Browse the repository at this point in the history