SHARE
TWEET

Untitled

a guest Feb 20th, 2017 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package;
  2.  
  3. import haxe.ds.Vector;
  4.  
  5. //
  6. class Main
  7. {
  8.  
  9.     /**
  10.      *
  11.      */
  12.     static function main()
  13.     {
  14.         var argh:Horror<MyEnum> = new Horror<MyEnum>();
  15.             argh.list[0] = MyEnum.A;
  16.    
  17.         var type:MyEnum = argh.list[0];
  18.     }
  19.  
  20. }
  21.  
  22. //
  23. class Horror<T:EnumValue>
  24. {
  25.     public var list:Vector<T>;
  26.            
  27.     public function new()
  28.     {
  29.         this.list = new Vector<T>(3);
  30.     }
  31. }
  32.  
  33. //
  34. enum MyEnum
  35. {
  36.     A;
  37.     B;
  38.     C;
  39. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top