From 2cfba51a299e3ce1caec530d9adb901a4d1df746 Mon Sep 17 00:00:00 2001 From: Victor Petukhov Date: Tue, 29 Mar 2022 11:14:38 +0300 Subject: [PATCH] [Compiler PSI] Make `getContextReceivers` default to preserve compatibility ^KT-51747 Fixed --- .../src/org/jetbrains/kotlin/psi/KtCallableDeclaration.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/psi/src/org/jetbrains/kotlin/psi/KtCallableDeclaration.java b/compiler/psi/src/org/jetbrains/kotlin/psi/KtCallableDeclaration.java index 2da5450f324..240b53a9d21 100644 --- a/compiler/psi/src/org/jetbrains/kotlin/psi/KtCallableDeclaration.java +++ b/compiler/psi/src/org/jetbrains/kotlin/psi/KtCallableDeclaration.java @@ -20,6 +20,7 @@ import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import java.util.Collections; import java.util.List; public interface KtCallableDeclaration extends KtNamedDeclaration, KtTypeParameterListOwner { @@ -33,7 +34,9 @@ public interface KtCallableDeclaration extends KtNamedDeclaration, KtTypeParamet KtTypeReference getReceiverTypeReference(); @NotNull - List getContextReceivers(); + default List getContextReceivers() { + return Collections.emptyList(); + } @Nullable KtTypeReference getTypeReference();