Fix unjustified assert in PropertyCodegen
#KT-5505 Fixed
This commit is contained in:
@@ -173,9 +173,10 @@ public class PropertyCodegen {
|
|||||||
JetExpression defaultValue = p.getDefaultValue();
|
JetExpression defaultValue = p.getDefaultValue();
|
||||||
if (defaultValue != null) {
|
if (defaultValue != null) {
|
||||||
CompileTimeConstant<?> constant = ExpressionCodegen.getCompileTimeConstant(defaultValue, bindingContext);
|
CompileTimeConstant<?> constant = ExpressionCodegen.getCompileTimeConstant(defaultValue, bindingContext);
|
||||||
assert constant != null : "Default value for annotation parameter should be compile time value: " + defaultValue.getText();
|
if (constant != null) {
|
||||||
AnnotationCodegen annotationCodegen = AnnotationCodegen.forAnnotationDefaultValue(visitor, typeMapper);
|
AnnotationCodegen annotationCodegen = AnnotationCodegen.forAnnotationDefaultValue(visitor, typeMapper);
|
||||||
annotationCodegen.generateAnnotationDefaultValue(constant, descriptor.getType());
|
annotationCodegen.generateAnnotationDefaultValue(constant, descriptor.getType());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
visitor.visitEnd();
|
visitor.visitEnd();
|
||||||
|
|||||||
Reference in New Issue
Block a user