View unanswered posts | View active topics



Reply to topic  [ 2 posts ] 
Code generator bug when overiding some methods with any args 
Author Message
Member

Joined: Sat Oct 17, 2009 12:41 am
Posts: 27
Reply with quote
Description http://www.flashdevelop.org/community/viewtopic.php?f=6&t=9745

ASGenerator.cs.patch
Code:
Index: ASGenerator.cs
===================================================================
--- ASGenerator.cs   (revision 2341)
+++ ASGenerator.cs   (working copy)
@@ -3874,6 +3874,12 @@
                 if (!noRet) typesUsed.Add(getQualifiedType(type, ofClass));
                 string action = (isProxy || isAS2Event) ? "" : GetSuperCall(member, typesUsed, ofClass);
                 string template = TemplateUtils.GetTemplate("MethodOverride");
+
+            // fix any keyword
+            for (int i = 0; i < member.Parameters.Count; i++)
+               if (member.Parameters[i].Type == "any")
+                  member.Parameters[i].Type = "*";
+            
                 template = TemplateUtils.ReplaceTemplateVariable(template, "Modifiers", acc);
                 template = TemplateUtils.ReplaceTemplateVariable(template, "Name", member.Name);
                 template = TemplateUtils.ReplaceTemplateVariable(template, "Arguments", TemplateUtils.ParametersString(member, true));


Tue Jun 26, 2012 10:24 am
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
Reply with quote
Thanks, this 'any' shouldn't even appear here but this patch will help for now :)


Tue Jun 26, 2012 9:33 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.