This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 163967 - [67cat] Internal compiler regression with generics
Summary: [67cat] Internal compiler regression with generics
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Dusan Balek
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2009-04-28 18:00 UTC by matthies
Modified: 2009-07-16 17:05 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description matthies 2009-04-28 18:00:51 UTC
Example:

    import java.util.Comparator;
    import java.util.List;

    class Test
    {
        static final <T extends Comparable<? super T>> Comparator<List<T>> comparator() { return null; }

        static <T extends Comparable<? super T>> void f()
        {
            Comparator<List<T>> comparator = comparator();  // [*]
        }
    }

For the statement marked with [*], the editor shows the following error:

    type parameters of <T>java.util.Comparator<java.util.List<T>> cannot be determined;
    no unique maximal instance exists for type variable T with upper bounds java.lang.Comparable<? super T>

The code though is correct and compiles without errors with JDK 1.6, and no error is shown by the NetBeans 6.5 editor.
Comment 1 Dusan Balek 2009-04-29 12:56:37 UTC
It is a regression in recent 1.7 javac caused by fix of http://bugs.sun.com/view_bug.do?bug_id=6315770.
Comment 2 Dusan Balek 2009-04-29 13:07:03 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/bcd1ea2f60c4
changeset 1b5486023a58 in main/nb-javac
details: http://hg.netbeans.org/main/nb-javac?cmd=changeset;node=1b5486023a58
Comment 3 Quality Engineering 2009-04-30 07:37:59 UTC
Integrated into 'main-golden', will be available in build *200904300201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/bcd1ea2f60c4
User: Dusan Balek <dbalek@netbeans.org>
Log: Issues #159166, #163746, and #163967 fixed.
Comment 4 matthies 2009-07-16 17:05:54 UTC
Verified in 6.7.