Преглед на файлове

use "typed_catch" instead of "is" as feature name

Simon Krajewski преди 13 години
родител
ревизия
937368ae88
променени са 3 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 1 1
      std/js/Boot.hx
  2. 2 2
      typecore.ml
  3. 1 1
      typer.ml

+ 1 - 1
std/js/Boot.hx

@@ -146,7 +146,7 @@ class Boot {
 		return __interfLoop(cc.__super__,cl);
 	}
 
-	@:feature("is") private static function __instanceof(o : Dynamic,cl) {
+	@:feature("typed_catch") private static function __instanceof(o : Dynamic,cl) {
 		untyped {
 			try {
 				if( __js__("o instanceof cl") ) {

+ 2 - 2
typecore.ml

@@ -38,7 +38,7 @@ type macro_mode =
 
 type feature =
 	| FtTypedCast
-	| FtIs
+	| FtTypedCatch
 
 type typer_globals = {
 	types_module : (path, path) Hashtbl.t;
@@ -242,7 +242,7 @@ let create_fake_module ctx file =
 
 let feature_name = function
 	| FtTypedCast -> "typed_cast"
-	| FtIs -> "is"
+	| FtTypedCatch -> "typed_catch"
 
 let activate_feature ctx ft = Hashtbl.replace ctx.g.features (feature_name ft) ft
 let has_feature ctx s = Hashtbl.mem ctx.g.features s

+ 1 - 1
typer.ml

@@ -1741,7 +1741,7 @@ and type_expr ctx ?(need_val=true) (e,p) =
 					List.iter (fun pt ->
 						if pt != t_dynamic then error "Catch class parameter must be Dynamic" p;
 					) params;
-					activate_feature ctx FtIs;
+					activate_feature ctx FtTypedCatch;
 					(match path with
 					| x :: _ , _ -> x
 					| [] , name -> name)