Skip to content

Parsing of nested generics #4514

@zhaar

Description

@zhaar

Consider the following code:

class Three<A, B, C> {}
class Two<A, B> {}
class One<A> {}
Two<One<One<Integer>>, Integer> fn = null;

The processing pre-processor give us the error "Maybe too many >characters" even though the type signature is correct at line 4.

Interestingly enough both of those compile correctly:

Two<One<One<Integer> >, Integer> fn = null;
Two<Integer, One<One<Integer>>> fn = null;

Trying with Three gives us those results:

Three<One<One<Integer>>,Integer, Integer> fn = null; //doesn't compile
Three<Integer,One<One<Integer>>, Integer> fn = null; //doesn't compile
Three<Integer, Integer, One<One<Integer>>> fn = null; //compile

There definitely is a problem with how processing parses intermediate Type arguments.
tested with processing 3.1.1

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions