Forráskód Böngészése

[typer] print type kind on "should extend" error

see #11095
Simon Krajewski 2 éve
szülő
commit
d89dc0853d
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      src/typing/typeloadCheck.ml

+ 1 - 1
src/typing/typeloadCheck.ml

@@ -343,7 +343,7 @@ module Inheritance = struct
 					typing_error "Cannot extend type parameters" p
 				| _ -> csup,params
 			end
-		| _ -> typing_error "Should extend by using a class" p
+		| t -> typing_error (Printf.sprintf "Should extend by using a class, found %s" (s_type_kind t)) p
 
 	let rec check_interface ctx missing c intf params =
 		List.iter (fun (i2,p2) ->