change signature: don't ask about covariant overrides when types are equal, e.g. when super type is changed based on override method return type

type annotations: ensure annotations are cloned so invalidating initial type doesn't break the consequence refactoring
EA-93296 - PIEAE: PsiUtilCore.ensureValid
This commit is contained in:
Anna.Kozlova
2017-01-10 19:36:31 +01:00
parent 15dbccb971
commit 23c0f28705
4 changed files with 48 additions and 2 deletions

View File

@@ -0,0 +1,20 @@
// "Make 'a.f' return 'java.util.List<java.lang.@N String>'" "true"
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
import java.util.List;
@Target({ElementType.TYPE_USE})
@interface N {}
class a {
List<@N String> f() {
return ;
}
}
class b extends a {
List<@N String> f() {
return null;
}
}

View File

@@ -0,0 +1,20 @@
// "Make 'a.f' return 'java.util.List<java.lang.@N String>'" "true"
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
import java.util.List;
@Target({ElementType.TYPE_USE})
@interface N {}
class a {
void f() {
return ;
}
}
class b extends a {
<caret>List<@N String> f() {
return null;
}
}