remove dependency with ast_java and JavaTypeNamespace: Variable
ast_java doesn't need to know about Type in JavaTypeNamespace.
This commit removes Type in Variable
Bug: 110967839
Test: ./runtests.sh
Test: m -j
Change-Id: Ideb434156c84c1e4003de16847bf8499bcd46b0a
diff --git a/ast_java.h b/ast_java.h
index 84461bc..c7fcf84 100644
--- a/ast_java.h
+++ b/ast_java.h
@@ -87,13 +87,13 @@
};
struct Variable : public Expression {
- const Type* type = nullptr;
+ const std::string type;
std::string name;
int dimension = 0;
Variable() = default;
- Variable(const Type* type, const std::string& name);
- Variable(const Type* type, const std::string& name, int dimension);
+ Variable(const std::string& type, const std::string& name);
+ Variable(const std::string& type, const std::string& name, int dimension);
virtual ~Variable() = default;
void WriteDeclaration(CodeWriter* to) const;