瀏覽代碼

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

see #11095
Simon Krajewski 2 年之前
父節點
當前提交
d89dc0853d
共有 1 個文件被更改,包括 1 次插入1 次删除
  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) ->