TypeCorrector#annotate: update provider for delegate

As methods like getCanonicalText, getPresentableText, etc. are just delegated, updating TypeAnnotationProvider on PsiCorrectedClassType only (without updating it on delegate) produced inconsistency.
Fixes IDEA-244190 'Override method' action should produce method with sorted modifiers

GitOrigin-RevId: e06785ba0810910d858d40b070a99c00a33c4e09
This commit is contained in:
Tagir Valeev
2020-07-16 03:56:07 +00:00
committed by intellij-monorepo-bot
parent 18caf05fff
commit ad7a6a7e33
3 changed files with 40 additions and 0 deletions
@@ -0,0 +1,19 @@
// "Implement methods" "true"
package org.jetbrains.annotations;
import java.lang.annotation.*;
abstract class Foo<T> {
abstract public @Nullable T getSmth();
}
class FooImpl extends Foo<String> {
@Override
public @Nullable String getSmth() {
return null;
}
}
@Target({ElementType.METHOD, ElementType.TYPE_USE})
@interface Nullable {}
@@ -0,0 +1,15 @@
// "Implement methods" "true"
package org.jetbrains.annotations;
import java.lang.annotation.*;
abstract class Foo<T> {
abstract public @Nullable T getSmth();
}
<caret>class FooImpl extends Foo<String> {
}
@Target({ElementType.METHOD, ElementType.TYPE_USE})
@interface Nullable {}