@@ -29,6 +29,9 @@ open Common
open Error
let type_function_arg ctx t e opt p =
+ (match follow t with
+ | TAbstract ({a_path = [],"Void"},_) -> error "Arguments of type Void are not allowed" p
+ | _ -> ());
if opt then
let e = (match e with None -> Some (EConst (Ident "null"),null_pos) | _ -> e) in
ctx.t.tnull t, e
@@ -0,0 +1,5 @@
+class Main {
+ static function method(param:Void = null) {}
+
+ public static function main() {}
+}
@@ -0,0 +1 @@
+-main Main
+Main.hx:2: characters 25-30 : Arguments of type Void are not allowed