ambiguous method call bug

I upgraded from 12.0.1 to 12.0.2 and started seeing ambiguous method call errors where I didn't see them before.

And as you can see in the screenshot, the error message doesn't make much sense.

I've seen ambiguous method call bugs mentioned in intellij11 at stackoverflow.

Any ideas on what to do? I can still build at the command line but it's annoying having errors in my ide.



Attachment(s):
Screen Shot 2013-01-18 at 4.22.48 PM.png
6 comments

Hi Robert,

You may try "File | Invalidate Caches..." -- it usually helps in weird-bug-after-upgrade situations.

0

Hi,

I did a File->Invalidate Caches... with a restart and unfortunately still see the error.

Rob

0

I went back to 12.0.1 and did another File->Invalidate Cache with a restart and I'm still seeing the error.

I may not have looked at this class for awhile and didn't notice the problem.

But I can build the code at the command line, java 1.6. It's a maven project.

Could the error be correct? I can't see why though.

0

I distilled it down to the following:


public class Intellij {

    public static <T> T getProperty(final String str, final Class<T> cls) {

        return null;

    }

    public static <T> T getProperty(final String str, final T defaultValue) {

        return null;

    }

    String[] ids = Intellij.getProperty("", String[].class);

}


The last line of code is giving the ambiguous method call error. Is that the correct behavior? It compiles fine but IntelliJ reports it as a compilation error.

0

BTW, this call is fine:

    String id = Intellij.getProperty("", String.class);

no error by intellij
0

Please sign in to leave a comment.