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(); }