From c73d091c52037ce7b1b9b771f4beec2c6f304504 Mon Sep 17 00:00:00 2001 From: Stanislav Erokhin Date: Thu, 5 Nov 2015 02:19:59 +0300 Subject: [PATCH] Minor. Fix compilation(KT-9898 Impossible implement kotlin interface in java) --- .../descriptors/impl/EnumEntrySyntheticClassDescriptor.java | 3 ++- .../src/org/jetbrains/kotlin/types/ErrorUtils.java | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/EnumEntrySyntheticClassDescriptor.java b/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/EnumEntrySyntheticClassDescriptor.java index 72fae68fc08..b4bb2fde278 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/EnumEntrySyntheticClassDescriptor.java +++ b/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/EnumEntrySyntheticClassDescriptor.java @@ -201,7 +201,8 @@ public class EnumEntrySyntheticClassDescriptor extends ClassDescriptorBase { @NotNull @Override - public Collection getContributedVariables(@NotNull Name name, @NotNull LookupLocation location) { + @SuppressWarnings({"unchecked"}) // KT-9898 Impossible implement kotlin interface in java + public Collection getContributedVariables(@NotNull Name name, @NotNull LookupLocation location) { return properties.invoke(name); } diff --git a/core/descriptors/src/org/jetbrains/kotlin/types/ErrorUtils.java b/core/descriptors/src/org/jetbrains/kotlin/types/ErrorUtils.java index 4cc662fe35c..b1541882cbd 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/types/ErrorUtils.java +++ b/core/descriptors/src/org/jetbrains/kotlin/types/ErrorUtils.java @@ -175,7 +175,8 @@ public class ErrorUtils { @NotNull @Override - public Set getContributedVariables(@NotNull Name name, @NotNull LookupLocation location) { + @SuppressWarnings({"unchecked"}) // KT-9898 Impossible implement kotlin interface in java + public Set getContributedVariables(@NotNull Name name, @NotNull LookupLocation location) { return ERROR_PROPERTY_GROUP; } @@ -236,7 +237,8 @@ public class ErrorUtils { @NotNull @Override - public Collection getContributedVariables(@NotNull Name name, @NotNull LookupLocation location) { + @SuppressWarnings({"unchecked"}) // KT-9898 Impossible implement kotlin interface from java + public Collection getContributedVariables(@NotNull Name name, @NotNull LookupLocation location) { throw new IllegalStateException(); }