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

Fix ATs to classes with implicit constructors and add more validation #21

Merged
merged 6 commits into from
Jun 27, 2024

Conversation

Matyrobbrt
Copy link
Member

  • inject constructors with the old class access level when ATs target classes with implicit constructors (as, according to the JLS, implicit constructors follow the access level of their owner)
  • prevent ATing enum constructors to public or protected
  • prevent narrowing access, fixes AccessTransformer can narrow access in dev #11
  • error when a record is AT'd without its constructor being AT'd too

@Matyrobbrt Matyrobbrt added the bug Something isn't working label Jun 27, 2024
@neoforged-pr-publishing
Copy link

neoforged-pr-publishing bot commented Jun 27, 2024

  • Publish PR to GitHub Packages

Last commit published: c23831e8a0858ce83ac6c77933d0e208f5197971.

PR Publishing

The artifacts published by this PR:

Repository Declaration

In order to use the artifacts published by the PR, add the following repository to your buildscript:

repositories {
    maven {
        name 'Maven for PR #21' // https://github.com/neoforged/JavaSourceTransformer/pull/21
        url 'https://prmaven.neoforged.net/JavaSourceTransformer/pr21'
        content {
            includeModule('net.neoforged.jst', 'jst-cli')
            includeModule('net.neoforged.jst', 'jst-cli-bundle')
        }
    }
}

@shartte shartte merged commit 0c5eb12 into main Jun 27, 2024
2 checks passed
@shartte shartte deleted the more-validation branch June 27, 2024 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AccessTransformer can narrow access in dev
2 participants