Github user shils commented on a diff in the pull request: https://github.com/apache/groovy/pull/242#discussion_r50188030 --- Diff: src/main/org/codehaus/groovy/transform/sc/StaticCompilationVisitor.java --- @@ -123,9 +123,20 @@ public void visitClass(final ClassNode node) { } super.visitClass(node); addPrivateFieldAndMethodAccessors(node); + if (isStaticallyCompiled(node)) { + ClassNode outer = node.getOuterClass(); + if (outer != null && !isStaticallyCompiled(outer)) { + outer.putNodeMetaData(StaticCompilationMetadataKeys.DYNAMIC_OUTER_NODE, true); + } + } classNode = oldCN; } + public void visitDynamicOuterClass(ClassNode node) { --- End diff -- adding a public method here is not ideal, though it seems like the alternative would be to create a separate class responsible for adding bridge methods, which would be used by StaticCompilationVisitor as well as the phase operation added for dynamic outer classes.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---