Evaluate the type before checking array dimension type
AidlConstantValue final_type_ changes after calling EvaluatedType...
So evaluate the constant value before checking the type.
This allows for Type::REF and Type::BINARY to be used in array
dimensions.
Test: atest aidl_unittests
Bug: N/A
Change-Id: Ic00699e3e6095c57b814df3140bf29dbcd2fb8dd
diff --git a/aidl_language.h b/aidl_language.h
index c9b3d27..226d8e3 100644
--- a/aidl_language.h
+++ b/aidl_language.h
@@ -679,6 +679,7 @@
Type GetType() const { return final_type_; }
const std::string& Literal() const { return value_; }
+ bool Evaluate() const;
virtual bool CheckValid() const;
// Raw value of type (currently valid in C++ and Java). Empty string on error.