Christopher Smith created GROOVY-12547:
------------------------------------------
Summary: STC writes unresolved placeholder type variables (T#E2;)
into closure generic signatures
Key: GROOVY-12547
URL: https://issues.apache.org/jira/browse/GROOVY-12547
Project: Groovy
Issue Type: Bug
Components: Compiler, Static compilation
Affects Versions: 6.0.0, 5.1.3, 4.0.33
Reporter: Christopher Smith
Attachments: mcve03_closure_signature_placeholder_leak.groovy
This is apparently a longstanding bug that was operationally harmless until
5.x. When a closure's inferred type (esp. from a functional chain) contains an
unbound type variable, the STC's placeholder gets emitted into the bytecode.
This was incorrect but working until 5.x, at which point `ClosureMetaClass`
started introspecting it, causing {{TypeNotPresentException}}.
The real-world use case is dynamically building Gremlin queries, where the
Gremlin DSL makes heavy use of generics chaining, especially with nested
generics.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)