Browse Source

prevent Null<Void> to exists in HL type system (close #7742)

ncannasse 6 years ago
parent
commit
ddd362398b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/generators/genhl.ml

+ 1 - 1
src/generators/genhl.ml

@@ -433,7 +433,7 @@ let rec to_type ?tref ctx t =
 		| _ -> class_type ~tref ctx c pl false)
 	| TAbstract ({a_path = [],"Null"},[t1]) ->
 		let t = to_type ?tref ctx t1 in
-		if not (is_nullable t) then HNull t else t
+		if not (is_nullable t) && t <> HVoid then HNull t else t
 	| TAbstract (a,pl) ->
 		if Meta.has Meta.CoreType a.a_meta then
 			(match a.a_path with