Adding info to an exception
This commit is contained in:
+4
-2
@@ -22,7 +22,6 @@ import org.jetbrains.jet.lang.descriptors.*;
|
|||||||
import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor;
|
import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor;
|
||||||
import org.jetbrains.jet.lang.resolve.DescriptorUtils;
|
import org.jetbrains.jet.lang.resolve.DescriptorUtils;
|
||||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||||
import org.jetbrains.jet.lang.types.JetType;
|
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -101,7 +100,10 @@ public class ConstructorDescriptorImpl extends FunctionDescriptorImpl implements
|
|||||||
@Override
|
@Override
|
||||||
protected FunctionDescriptorImpl createSubstitutedCopy(DeclarationDescriptor newOwner, boolean preserveOriginal, Kind kind) {
|
protected FunctionDescriptorImpl createSubstitutedCopy(DeclarationDescriptor newOwner, boolean preserveOriginal, Kind kind) {
|
||||||
if (kind != Kind.DECLARATION) {
|
if (kind != Kind.DECLARATION) {
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException("Attempt at creating a constructor that is not a declaration: \n" +
|
||||||
|
"copy from: " + this + "\n" +
|
||||||
|
"newOwner: " + newOwner + "\n" +
|
||||||
|
"kind: " + kind);
|
||||||
}
|
}
|
||||||
return new ConstructorDescriptorImpl(
|
return new ConstructorDescriptorImpl(
|
||||||
(ClassDescriptor) newOwner,
|
(ClassDescriptor) newOwner,
|
||||||
|
|||||||
Reference in New Issue
Block a user