Community
Participate
Working Groups
In the example below, the "adapterType == Bar.class" test produces the error: Incompatible operand types Class<capture#2-of ? extends T> and Class<Bug.Bar> package com.example.bug; public class Bug { public <T> T getAdapter(Class<? extends T> adapterType) { T result = null; if (adapterType == Foo.class) { } else if (adapterType == Bar.class) { } return result; } public class Foo { } public interface Bar { } } There's code like this in the EMF Transaction Framework, which now fails to compile.
Anthony, this error affects TransactionalEditingDomainImpl.
Reproduced on HEAD. I'll take a look.
Released disabled junit org.eclipse.jdt.core.tests.compiler.regression.GenericsRegressionTest._test330869(). Will be enabled once the fix is there.
Seems to be related to the fix for bug 322531.
If by next I build, a suitable fix is not available, I'll roll back the fix for bug 322531 and reopen it rather as it is of less serious nature than the current bug.
Created attachment 183722 [details] Patch for rollback of fix for bug 322531 As a temporary measure, this patch - Short circuits the fix for bug 322531 - Disables some tests introduced for 322531 that fail due to the short circuit. - Enabled the test added for current bug
Released the rollback patch in HEAD for 3.7 M4. Reopened bug 322531
Verified using I20101207-0250 (4.1 I-build)
Verified for 3.7RC0 using build I20110428-0848