I have this strange error, I have a class defined like so:
package net.guttershark.model 
{
  public class Model 
  {
    private static var instance:Model;
    public var test:Boolean;
    public static function gi():Model
    {
      if(instance == null) instance = new Model();
      return instance;
    }
  }
}
It throws error 1119 any time I try to use it like so: trace(Model.gi().test);
The error:
"1119: Access of possibly undefined property test through a reference with static type Model.
Now when I simply rename the class to this:
package net.guttershark.model
{
 public class Model2
 {
 private static var instance:Model2;
 public var test:Boolean;
 public static function gi():Model2
 {
 if(instance == null) instance = new Model2();
 return instance;
 }
}
}
I get no errors, and it works fine. Whey does the class name conflict
with the last folder in the package structure? And is there a way
around this?