|
@@ -30,9 +30,8 @@ open Error
|
|
|
|
|
|
let type_function_arg ctx t e opt p =
|
|
|
delay ctx PTypeField (fun() ->
|
|
|
- match follow t with
|
|
|
- | TAbstract ({a_path = [],"Void"},_) -> error "Arguments of type Void are not allowed" p
|
|
|
- | _ -> ()
|
|
|
+ if ExtType.is_void (follow t) then
|
|
|
+ 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
|