Martinho0330 / javaparser

Automatically exported from code.google.com/p/javaparser
0 stars 0 forks source link

Wrong handling of generics in case of inner classes #57

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a compilation unit of this signature: public void 
recordInterfaces(DisambiguateProperties<JSType>.Property p) {} 
2. Use a DumpVisitor to print the AST

What is the expected output? What do you see instead?
The expected output should be:
public void recordInterfaces(DisambiguateProperties<JSType>.Property p) {}

Instead, it is:
public void recordInterfaces(DisambiguateProperties<JSType>.Property<JSType> p) 
{}

The generics JSType of class DisambiguateProperties is wrongly associated to 
Property class.

What version of the product are you using? On what operating system?
Java Parser 1.0.8

Please provide any additional information below.
To fix the problem line 1810 of class ASTParser should be changed from ";" to 
"typeArgs = null;".

Original issue reported on code.google.com by andreama...@gmail.com on 4 Jul 2012 at 9:55