SapphireSteel Forum
Welcome,
Guest
. Please
login
or
register
.
May 20, 2013, 09:22:07 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Welcome to the SapphireSteel forum - for discussion of the Ruby In Steel and Amethyst IDEs
3883
Posts in
799
Topics by
669
Members
Latest Member:
m
SapphireSteel Forum
General
Amethyst
Static field initializers are improperly flagged as errors
« previous
next »
Pages:
[
1
]
Author
Topic: Static field initializers are improperly flagged as errors (Read 980 times)
Nypyren
Newbie
Posts: 29
Static field initializers are improperly flagged as errors
«
on:
June 14, 2012, 07:29:48 PM »
For example:
public class ClassName
{
private static var m_array:Array = new Array();
m_array["name1"] = "ASDF"; // This is flagged as an error, but is legal in AS3.
}
This also occurs with non-array types like ints, strings, etc.
«
Last Edit: June 15, 2012, 12:26:35 AM by Nypyren
»
Logged
Dermot
Administrator
Hero Member
Posts: 1005
Re: Static field initializers are improperly flagged as errors
«
Reply #1 on:
June 15, 2012, 03:36:36 AM »
Thanks for reporting this - it is a bug.
It won't stop a build since, as you point out, this is correct ActionScript syntax.
We've fixed this in the latest build of Amethyst 1.6 which should be available early next week.
We'll post here when it's ready with a download link so you can try it.
Dermot
«
Last Edit: June 15, 2012, 03:40:27 AM by Dermot
»
Logged
Dermot
Administrator
Hero Member
Posts: 1005
Re: Static field initializers are improperly flagged as errors
«
Reply #2 on:
June 17, 2012, 01:16:55 PM »
Fixed in 1.6.0 build 1375 (
http://sapphiresteel.com/forum/index.php?topic=785.0
)
Dermot
Logged
Nypyren
Newbie
Posts: 29
Re: Static field initializers are improperly flagged as errors
«
Reply #3 on:
June 18, 2012, 11:36:41 AM »
Excellent, thanks!
Logged
Nypyren
Newbie
Posts: 29
Re: Static field initializers are improperly flagged as errors
«
Reply #4 on:
June 18, 2012, 11:58:01 AM »
I just found a second bug in the static field initializers: If we're assigning a classname to a variable, the intellisense scanner thinks it's an error.
Example:
protected static var m_classMap:Array= new Array();
m_classMap["A"] = ClassA; // where these are names of classes
m_classMap["B"] = ClassB;
m_classMap["C"] = ClassC;
This assignment gets scanned properly in a function body, but not out in the class body.
Logged
Dermot
Administrator
Hero Member
Posts: 1005
Re: Static field initializers are improperly flagged as errors
«
Reply #5 on:
June 18, 2012, 12:09:16 PM »
yes - you are quite right. A class name is statically known at that point, so it can be an rvalue in that context.
We'll upload a new version with a fix later in the week (give you a chance to find any more errors!)
Dermot
Logged
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> News and Announcements
=> Amethyst
=> Ruby In Steel
=> Ruby Programming
=> The Snug Bar