Browse Source

[typer] more helpful error for invalid usage of @:const type params (#6953)

* [typer] more helpful error for invalid usage of @:const type params

* [skip ci]

* [skip ci]
Jens Fischer 7 years ago
parent
commit
5cd425d8e3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/typing/typer.ml

+ 1 - 1
src/typing/typer.ml

@@ -2320,7 +2320,7 @@ and type_ident ctx i p mode =
 				if Typeload.is_generic_parameter ctx c && Meta.has Meta.Const c.cl_meta then
 					AKExpr (type_module_type ctx (TClassDecl c) None p)
 				else begin
-					display_error ctx ("Type parameter " ^ i ^ " is only available at compilation and is not a runtime value") p;
+					display_error ctx ("Only @:const type parameters on @:generic classes can be used as value") p;
 					AKExpr (mk (TConst TNull) t_dynamic p)
 				end
 			with Not_found ->