unconditional assertion, helpful message

This commit is contained in:
Stepan Koltsov
2012-05-25 15:07:54 +04:00
parent 2bb647bdb8
commit c38f19dbd9
@@ -368,7 +368,11 @@ public class OverrideResolver {
@NotNull Multimap<CallableDescriptor, CallableDescriptor> invisibleOverriddenDescriptors) {
JetNamedDeclaration member = (JetNamedDeclaration) BindingContextUtils.descriptorToDeclaration(trace.getBindingContext(), declared);
if (member == null) {
assert trace.get(DELEGATED, declared);
Boolean delegated = trace.get(DELEGATED, declared);
if (delegated == null || !delegated)
throw new IllegalStateException(
"decriptor is not resolved to declaration" +
" and it is not delegate: " + declared + ", DELEGATED: " + delegated);
return;
}