This is an automated email from the ASF dual-hosted git repository.
paulk-asert pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
from c7c0eabeee minor items
new 9a52d3de87 GROOVY-11998: Better support of intersection types (part 1)
Grammar + AST. intersectionType rule, IntersectionTypeClassNode, AstBuilder
updates. Includes parser tests; no semantic impact (ResolveVisitor errors out
on it).
new ce0fe94d05 GROOVY-11998: Better support of intersection types (part 2)
Resolution + STC. ResolveVisitor resolves components;
StaticTypeCheckingVisitor.visitCastExpression validates and propagates.
LAMBDA_MARKERS metadata. Static error messages.
new f7a1256bbf GROOVY-11998: Better support of intersection types (part 3)
Bytecode for lambdas/method refs. writeFunctionalInterfaceIndy markers,
altMetafactory flags. Static parity with Java's (R & S) ()->….
new 1f28e07b60 GROOVY-11998: Better support of intersection types (part 4)
as coercion. Closure asType overload, ProxyGenerator plumbing, dynamic
castToType(Object, Class[]).
new 566c8f2c04 GROOVY-11998: Better support of intersection types (part 5)
Closure literal native intersection. StaticTypesClosureWriter generates a class
implementing all components for (R & S) { -> ... }, docs.
new 9d5fd190e7 GROOVY-11999: ProxyGeneratorAdapter NPE when proxy
interfaces mix bootstrap and user classloaders
new a24f1c7300 GROOVY-11998: Better support of intersection types (copilot
review)
The 7 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
ARCHITECTURE.md | 22 +-
src/antlr/GroovyParser.g4 | 13 +-
.../apache/groovy/parser/antlr4/AstBuilder.java | 47 +++-
.../groovy/ast/IntersectionTypeClassNode.java | 103 +++++++++
.../groovy/classgen/AsmClassGenerator.java | 62 +++++-
.../asm/sc/AbstractFunctionalInterfaceWriter.java | 89 +++++++-
.../classgen/asm/sc/StaticTypesClosureWriter.java | 31 +++
.../classgen/asm/sc/StaticTypesLambdaWriter.java | 27 ++-
...StaticTypesMethodReferenceExpressionWriter.java | 28 ++-
.../codehaus/groovy/control/ResolveVisitor.java | 8 +
.../groovy/runtime/IntersectionCastSupport.java | 103 +++++++++
.../groovy/runtime/ProxyGeneratorAdapter.java | 12 +-
.../groovy/tools/javac/JavaStubGenerator.java | 2 +-
.../groovy/transform/RecordBaseASTStubber.java | 2 +-
.../transform/stc/StaticTypeCheckingVisitor.java | 93 +++++++-
.../groovy/transform/stc/StaticTypesMarker.java | 6 +-
src/spec/doc/core-differences-java.adoc | 19 ++
src/spec/doc/core-semantics.adoc | 59 +++++
src/spec/test/CoercionTest.groovy | 97 ++++++++
src/test-resources/core/Groovydoc_02x.groovy | 4 +-
src/test/groovy/bugs/Groovy11967.groovy | 2 +-
.../groovy/lang/IntersectionCastE2ETest.groovy | 183 ++++++++++++++++
.../lang/IntersectionClosureLiteralTest.groovy | 217 ++++++++++++++++++
.../groovy/lang/IntersectionCoercionTest.groovy | 173 +++++++++++++++
.../transform/stc/IntersectionCastSTCTest.groovy | 243 +++++++++++++++++++++
.../groovy/util/ProxyGeneratorAdapterTest.groovy | 39 ++++
.../antlr4/IntersectionCastParserTest.groovy | 171 +++++++++++++++
.../groovy/tools/groovydoc/TagRenderer.java | 4 +-
.../groovydoc/antlr4/GroovydocJavaVisitor.java | 2 +-
.../groovy/tools/groovydoc/GroovyDocToolTest.java | 4 +-
.../testfiles/ScriptWithMarkdownTopLevelDoc.groovy | 2 +-
31 files changed, 1813 insertions(+), 54 deletions(-)
create mode 100644
src/main/java/org/codehaus/groovy/ast/IntersectionTypeClassNode.java
create mode 100644
src/main/java/org/codehaus/groovy/runtime/IntersectionCastSupport.java
create mode 100644 src/test/groovy/groovy/lang/IntersectionCastE2ETest.groovy
create mode 100644
src/test/groovy/groovy/lang/IntersectionClosureLiteralTest.groovy
create mode 100644 src/test/groovy/groovy/lang/IntersectionCoercionTest.groovy
create mode 100644
src/test/groovy/groovy/transform/stc/IntersectionCastSTCTest.groovy
create mode 100644
src/test/groovy/org/apache/groovy/parser/antlr4/IntersectionCastParserTest.groovy