Hi,
I get the compiling error: Parameter initializer unknown or is not a
compile-time constant - in a constructor that references another class
for a parameter default value.
Follows the 2 files needed to reproduce the problem:
File Unit.as:
package test
{
public class Unit
{
private var _name: String;
private var _system: String;
public function Unit(pName: String, pSystem: String =
UnitSystem.METRIC)
{
_name = pName;
_system = pSystem;
}
}
}
File UnitSystem.as:
package test
{
public final class UnitSystem
{
public static const METRIC: String = "metric";
public static const IMPERIAL: String = "imperial";
}
}
If the class Unit is renamed to ZUnit, the files compiles
successfully.
Is the compiler dependent on file ordering? Can it be controlled
somehow through the configuration?
Regards,
Alain Gilbert
--
You received this message because you are subscribed to the Google
Groups "Flex Mojos" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex-mojos?hl=en?hl=en
http://blog.flex-mojos.info/