From 4980a3357231c833ebdb7111d16e7be5bd342521 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Fri, 18 Jul 2014 20:19:43 +0400 Subject: [PATCH] Fix unjustified assert in PropertyCodegen #KT-5505 Fixed --- .../src/org/jetbrains/jet/codegen/PropertyCodegen.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/compiler/backend/src/org/jetbrains/jet/codegen/PropertyCodegen.java b/compiler/backend/src/org/jetbrains/jet/codegen/PropertyCodegen.java index 1b9549e09b9..6f7e50cf061 100644 --- a/compiler/backend/src/org/jetbrains/jet/codegen/PropertyCodegen.java +++ b/compiler/backend/src/org/jetbrains/jet/codegen/PropertyCodegen.java @@ -173,9 +173,10 @@ public class PropertyCodegen { JetExpression defaultValue = p.getDefaultValue(); if (defaultValue != null) { CompileTimeConstant constant = ExpressionCodegen.getCompileTimeConstant(defaultValue, bindingContext); - assert constant != null : "Default value for annotation parameter should be compile time value: " + defaultValue.getText(); - AnnotationCodegen annotationCodegen = AnnotationCodegen.forAnnotationDefaultValue(visitor, typeMapper); - annotationCodegen.generateAnnotationDefaultValue(constant, descriptor.getType()); + if (constant != null) { + AnnotationCodegen annotationCodegen = AnnotationCodegen.forAnnotationDefaultValue(visitor, typeMapper); + annotationCodegen.generateAnnotationDefaultValue(constant, descriptor.getType()); + } } visitor.visitEnd();