allow AnyValue to be a constant value

This commit is contained in:
Dave Holoway
2020-06-06 14:32:47 +01:00
parent 67f1b617ff
commit f294cb2af1

View File

@@ -651,6 +651,9 @@ function isConstantValue(v) {
if (v instanceof Field) { if (v instanceof Field) {
return v.modifiers.includes('final'); return v.modifiers.includes('final');
} }
if (v instanceof AnyValue) {
return true;
}
// Parameters and ArrayElements are never constant // Parameters and ArrayElements are never constant
return v instanceof LiteralValue; return v instanceof LiteralValue;
} }