useful asserts in codegen
This commit is contained in:
@@ -1097,6 +1097,11 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> {
|
|||||||
if (propertyDescriptor.getGetter() == null) {
|
if (propertyDescriptor.getGetter() == null) {
|
||||||
getter = null;
|
getter = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (getter == null && propertyDescriptor.getReceiverParameter().exists()) {
|
||||||
|
throw new IllegalStateException();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//noinspection ConstantConditions
|
//noinspection ConstantConditions
|
||||||
if (isInsideClass && (propertyDescriptor.getSetter() == null || propertyDescriptor.getSetter().isDefault())) {
|
if (isInsideClass && (propertyDescriptor.getSetter() == null || propertyDescriptor.getSetter().isDefault())) {
|
||||||
@@ -1109,6 +1114,10 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> {
|
|||||||
if (propertyDescriptor.getSetter() == null) {
|
if (propertyDescriptor.getSetter() == null) {
|
||||||
setter = null;
|
setter = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (setter == null && propertyDescriptor.isVar() && propertyDescriptor.getReceiverParameter().exists()) {
|
||||||
|
throw new IllegalStateException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user