AidlConstantValue::evaluate() with no type arg

Because the result of AidlConstantValue::evaluate() is cached we should
not rely on "type" parameter. For example, if ValueString(type) is later
called with a different type, the cached result may not be valid.

Actual type-related checks/conversions are done in ValueString(type).

Bug: none
Test: aidl_unittests
Change-Id: Ic6bc36566d82a917a8cf08c1740f576be5578706
diff --git a/aidl_language.h b/aidl_language.h
index 1f03d4c..0def6d8 100644
--- a/aidl_language.h
+++ b/aidl_language.h
@@ -564,7 +564,7 @@
   static bool ParseIntegral(const string& value, int64_t* parsed_value, Type* parsed_type);
   static bool IsHex(const string& value);
 
-  virtual bool evaluate(const AidlTypeSpecifier& type) const;
+  virtual bool evaluate() const;
 
   const Type type_ = Type::ERROR;
   const vector<unique_ptr<AidlConstantValue>> values_;  // if type_ == ARRAY
@@ -601,7 +601,7 @@
   const AidlConstantValue* Resolve();
 
  private:
-  bool evaluate(const AidlTypeSpecifier& type) const override;
+  bool evaluate() const override;
 
   std::unique_ptr<AidlTypeSpecifier> ref_type_;
   std::string field_name_;
@@ -622,7 +622,7 @@
   }
 
  private:
-  bool evaluate(const AidlTypeSpecifier& type) const override;
+  bool evaluate() const override;
 
   std::unique_ptr<AidlConstantValue> unary_;
   const string op_;
@@ -647,7 +647,7 @@
   }
 
  private:
-  bool evaluate(const AidlTypeSpecifier& type) const override;
+  bool evaluate() const override;
 
   std::unique_ptr<AidlConstantValue> left_val_;
   std::unique_ptr<AidlConstantValue> right_val_;