ソースを参照

Merge pull request #2144 from jasononeil/feature/allowdispatchsubclass

Allow Dispatch to be subclassed
Nicolas Cannasse 12 年 前
コミット
55825902eb
1 ファイル変更4 行追加1 行削除
  1. 4 1
      std/haxe/web/Dispatch.hx

+ 4 - 1
std/haxe/web/Dispatch.hx

@@ -59,7 +59,7 @@ enum DispatchError {
 	DETooManyValues;
 	DETooManyValues;
 }
 }
 
 
-private class Redirect {
+class Redirect {
 	public function new() {
 	public function new() {
 	}
 	}
 }
 }
@@ -258,6 +258,9 @@ class Dispatch {
 						}
 						}
 						return MRSpod(i.toString(), lock);
 						return MRSpod(i.toString(), lock);
 					}
 					}
+					else if ( name == "haxe.web.Dispatch" ) {
+						return MRDispatch;
+					}
 					csup = csup.t.get().superClass;
 					csup = csup.t.get().superClass;
 				}
 				}
 				Context.error("Unsupported dispatch type '"+i.toString()+"'",p);
 				Context.error("Unsupported dispatch type '"+i.toString()+"'",p);