Support generalized light element conversion

This commit is contained in:
Alexey Sedunov
2014-01-28 15:22:32 +04:00
parent 374682e404
commit 460babbd6f
@@ -184,10 +184,7 @@ public class KotlinSafeDeleteProcessor extends JavaSafeDeleteProcessor {
@SuppressWarnings("MethodOverridesStaticMethodOfSuperclass") @SuppressWarnings("MethodOverridesStaticMethodOfSuperclass")
public static boolean isInside(@NotNull PsiElement place, @NotNull PsiElement ancestor) { public static boolean isInside(@NotNull PsiElement place, @NotNull PsiElement ancestor) {
if (ancestor instanceof KotlinLightMethod) { return JavaSafeDeleteProcessor.isInside(place, AsJavaPackage.getUnwrapped(ancestor));
ancestor = ((KotlinLightMethod) ancestor).getOrigin();
}
return JavaSafeDeleteProcessor.isInside(place, ancestor);
} }
@Nullable @Nullable