Skip to content

Commit

Permalink
Assure that synthetic field is retained.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Jan 7, 2022
1 parent e4e62f1 commit 4d02893
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -268,7 +268,11 @@ private static class DeprecationSample {
}

private class SyntheticField {
/* empty */

@SuppressWarnings("unused")
Object m() { // Since Java 18, a reference to the outer class is required to retain the synthetic field.
return AbstractFieldDescriptionTest.this;
}
}

private static class TransientSample {
Expand Down

0 comments on commit 4d02893

Please sign in to comment.