Browse Source

[display] make Haxe null-safe

j/k
Simon Krajewski 7 years ago
parent
commit
55c39e4086
1 changed files with 5 additions and 5 deletions
  1. 5 5
      src/core/display/completionItem.ml

+ 5 - 5
src/core/display/completionItem.ml

@@ -498,8 +498,8 @@ let to_json ctx item =
 			| _ -> assert false
 			end
 	in
-	jobject [
-		"kind",jstring kind;
-		"args",data;
-		"type",jopt (generate_type ctx) item.ci_type;
-	]
+	jobject (
+		("kind",jstring kind) ::
+		("args",data) ::
+		(match item.ci_type with None -> [] | Some t -> ["type",generate_type ctx t])
+	)