Bug 395034 - [infer type arguments] Incorrectly adds type parameter to a constructor invocation when invoked on a generic class
Summary: [infer type arguments] Incorrectly adds type parameter to a constructor invoc...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-25 21:35 EST by Milos Gligoric CLA
Modified: 2022-09-14 08:08 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Milos Gligoric CLA 2012-11-25 21:35:37 EST
Steps to reproduce:
1. Invoke "Infer Generic Type Arguments" on class C
2. The resulting file does not compile ("The constructor C<E>(Object[]) is undefined")

class C<E> {

    C(E[] es) {
    }

    public C<E> m() {
        return new C(new Object[0]);
    }
}

(Thanks to Yilong Li for helping with the bug report.)
Comment 1 Martin Mathew CLA 2013-01-24 06:48:42 EST
Issue is reproducible using Build id: I20130115-1300. The refactoring results in compiler error.
Comment 2 Eclipse Genie CLA 2020-08-11 11:41:18 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 3 Eclipse Genie CLA 2022-09-14 08:08:52 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.