History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEABKL-3705
Type: Bug Bug
Status: Open Open
Priority: Normal Normal
Assignee: Eugene Vigdorchik
Reporter: Thomas Singer
Votes: 0
Watchers: 0
Available Workflow Actions

Mark as Stalled
Operations

If you were logged in you would be able to see more operations.
IDEA: Backlog

Generics: incorrect smart code completion (Generic array creation)

Created: 12 Feb 06 11:53   Updated: 11 Jul 06 16:00
Component/s: Editor. Code Completion
Affects Version/s: None
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 5,131
Severity: Medium


 Description  « Hide
public class Bar<T> {
}

public class Foo <T> {

	private final Bar<T>[] ts;

	public Foo(Bar<T>[] ts) {
		this.ts = ts;
	}

	public Bar<T> getT(int i) {
		return ts[i];
	}

	public static Foo<String> createStringInstance() {
		return new Foo<String>(new Bar|);
	}
}

Press Ctrl-Shift-Space at the caret (|) and you will get a compile time error:

public class Foo <T> {

	...

	public static Foo<String> createStringInstance() {
		return new Foo<String>(new Bar<String>[0]);
	}
}


 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.