Assertion messages added
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2013 JetBrains s.r.o.
|
* Copyright 2010-2014 JetBrains s.r.o.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -390,7 +390,9 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
|||||||
for (JetDelegationSpecifier specifier : delegationSpecifiers) {
|
for (JetDelegationSpecifier specifier : delegationSpecifiers) {
|
||||||
if (specifier instanceof JetDelegatorToSuperClass || specifier instanceof JetDelegatorToSuperCall) {
|
if (specifier instanceof JetDelegatorToSuperClass || specifier instanceof JetDelegatorToSuperCall) {
|
||||||
JetType superType = bindingContext.get(BindingContext.TYPE, specifier.getTypeReference());
|
JetType superType = bindingContext.get(BindingContext.TYPE, specifier.getTypeReference());
|
||||||
assert superType != null;
|
assert superType != null :
|
||||||
|
String.format("No type recorded for \n---\n%s\n---\n", JetPsiUtil.getElementTextWithContext(specifier));
|
||||||
|
|
||||||
ClassDescriptor superClassDescriptor = (ClassDescriptor) superType.getConstructor().getDeclarationDescriptor();
|
ClassDescriptor superClassDescriptor = (ClassDescriptor) superType.getConstructor().getDeclarationDescriptor();
|
||||||
assert superClassDescriptor != null;
|
assert superClassDescriptor != null;
|
||||||
if (!isInterface(superClassDescriptor)) {
|
if (!isInterface(superClassDescriptor)) {
|
||||||
|
|||||||
+2
-1
@@ -154,7 +154,8 @@ class CodegenAnnotatingVisitor extends JetVisitorVoid {
|
|||||||
@Override
|
@Override
|
||||||
public void visitEnumEntry(@NotNull JetEnumEntry enumEntry) {
|
public void visitEnumEntry(@NotNull JetEnumEntry enumEntry) {
|
||||||
ClassDescriptor descriptor = bindingContext.get(CLASS, enumEntry);
|
ClassDescriptor descriptor = bindingContext.get(CLASS, enumEntry);
|
||||||
assert descriptor != null;
|
assert descriptor != null :
|
||||||
|
String.format("No descriptor for enum entry \n---\n%s\n---\n", JetPsiUtil.getElementTextWithContext(enumEntry));
|
||||||
|
|
||||||
boolean trivial = enumEntry.getDeclarations().isEmpty();
|
boolean trivial = enumEntry.getDeclarations().isEmpty();
|
||||||
if (!trivial) {
|
if (!trivial) {
|
||||||
|
|||||||
Reference in New Issue
Block a user