Bug 377993 - Type inference fails for parameterized method call
Summary: Type inference fails for parameterized method call
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.6.12   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-28 03:34 EDT by Matt Zimmer CLA
Modified: 2012-04-28 03:39 EDT (History)
0 users

See Also:


Attachments
maven source project that reproduces the described behavior (1.99 KB, application/x-gzip)
2012-04-28 03:37 EDT, Matt Zimmer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Zimmer CLA 2012-04-28 03:34:38 EDT
Build Identifier: AspectJ Compiler 1.6.12 (1.6.12 - Built: Tuesday Oct 18, 2011 at 17:52:06 GMT) - Eclipse Compiler 0.785_R33x, 3.3

The following error occurs:
Type mismatch: cannot convert from Map<String,A.Inner<?>> to Map<String,A.Inner<?>>

with this code that compiles through javac:

package aspectj;

import com.google.common.collect.Maps;
import java.util.Map;

public class App
{
    public static void main( String[] args )
    {
        System.out.println( "Hello World!" );
    }

}

class A<T> {
    static class Inner<T> {
    }

    static Map<String, Inner<?>> getMap() {
        return Maps.newHashMap();
    }

}

class B {
    public void failsCompilation() {
        Map<String, A.Inner<?>> map = A.getMap();
    }
}


Reproducible: Always

Steps to Reproduce:
Run pom.xml (ajc) and pom2.xml (plain javac) in the attached tarball (I'm assuming I can attach after I submit).
Comment 1 Matt Zimmer CLA 2012-04-28 03:37:41 EDT
Created attachment 214758 [details]
maven source project that reproduces the described behavior