diff options
author | Brad Beckmann <Brad.Beckmann@amd.com> | 2009-11-18 13:55:58 -0800 |
---|---|---|
committer | Brad Beckmann <Brad.Beckmann@amd.com> | 2009-11-18 13:55:58 -0800 |
commit | ed54ecf1c8f66d544385bbaa0d5902d5af4394e3 (patch) | |
tree | 39f813ed2fcac259962225fd2f406f010e646d3f | |
parent | 994169327a232a4325d529a7071c295fa39cf7d2 (diff) | |
download | gem5-ed54ecf1c8f66d544385bbaa0d5902d5af4394e3.tar.xz |
ruby: slicc method error fix
Added error message when a method call is not supported by an object.
-rw-r--r-- | src/mem/slicc/ast/MethodCallExprAST.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mem/slicc/ast/MethodCallExprAST.py b/src/mem/slicc/ast/MethodCallExprAST.py index d423ee4a7..3f9b250c1 100644 --- a/src/mem/slicc/ast/MethodCallExprAST.py +++ b/src/mem/slicc/ast/MethodCallExprAST.py @@ -97,6 +97,9 @@ class MemberMethodCallExprAST(MethodCallExprAST): methodId = obj_type.methodId(self.proc_name, paramTypes) prefix = "" + if methodId not in obj_type.methods: + self.error("Invalid method call: Type '%s' does not have a method '%s'", + obj_type, methodId) return_type = obj_type.methods[methodId].return_type if return_type.isInterface: prefix = "static_cast<%s &>" % return_type.c_ident |