Issue 19 in caffeine-hx: as3hx struggles with functions named "set" and "get", though AS3 seems to allow this syntax

4 views
Skip to first unread message

caffe...@googlecode.com

unread,
Apr 24, 2013, 10:19:18 PM4/24/13
to caffein...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 19 by crowde...@gmail.com: as3hx struggles with functions
named "set" and "get", though AS3 seems to allow this syntax
http://code.google.com/p/caffeine-hx/issues/detail?id=19

What steps will reproduce the problem?
1. Try to convert a module containing a class with a member function
named "get"
2. Observe crash.
3. Rename function to something not "get", or apply the following patch:

Index: as3hx/Parser.hx
===================================================================
--- as3hx/Parser.hx (revision 754)
+++ as3hx/Parser.hx (working copy)
@@ -912,8 +912,10 @@
openDebug("parseClassFun(");
var name = id();
if( name == "get" || name == "set" ) {
- kwds.push(name);
- name = id();
+ if (peek() != TPOpen) {
+ kwds.push(name);
+ name = id();
+ }
}
dbgln(Std.string(kwds) + " " + name + ")", false);
var f = parseFun();

4. Observe success!

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.




--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages