GuessTypeParameters: explicitly set type element to the expected type

This commit is contained in:
Daniil Ovchinnikov
2017-09-05 21:13:29 +03:00
parent ebfcd19434
commit e5cb361156
9 changed files with 76 additions and 1 deletions
@@ -0,0 +1,12 @@
// "Create field 'foo'" "true"
class Usage {
void usage(Generic<String> g, List<String> p) {
g.foo = p;
}
}
class Generic<T> {
public List<T> foo;
}
@@ -0,0 +1,12 @@
// "Create field 'foo'" "true"
class Usage {
void usage(Generic<String> g, List<String>[] p) {
g.foo = p;
}
}
class Generic<T> {
public List<T>[] foo;
}
@@ -0,0 +1,11 @@
// "Create field 'foo'" "true"
class Usage {
void usage(Generic<String> g, List<String> p) {
g.f<caret>oo = p;
}
}
class Generic<T> {
}
@@ -0,0 +1,11 @@
// "Create field 'foo'" "true"
class Usage {
void usage(Generic<String> g, List<String>[] p) {
g.f<caret>oo = p;
}
}
class Generic<T> {
}