Allow @CompileWithTargetClassAccess to work with all classes
Switch from `MethodHandles.privateLookupIn` to a reflection based approach to that target classes to not need to be explicitly listed. Closes gh-28580
This commit is contained in:
@@ -170,7 +170,7 @@ class TestCompilerTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@CompileWithTargetClassAccess(classNames = "com.example.PackagePrivate")
|
||||
@CompileWithTargetClassAccess
|
||||
void compiledCodeCanAccessExistingPackagePrivateClassIfAnnotated() throws ClassNotFoundException, LinkageError {
|
||||
SourceFiles sourceFiles = SourceFiles.of(SourceFile.of("""
|
||||
package com.example;
|
||||
|
||||
Reference in New Issue
Block a user