Test.hx 225 B

1234567891011
  1. @:nullSafety
  2. class Test {
  3. public static function toArray<T>(item:Null<T>, times:Int):Array<Null<T>> {
  4. final arr:Array<Null<T>> = [];
  5. for (i in 0...times)
  6. arr.push(item);
  7. return arr;
  8. }
  9. static function main() {}
  10. }