Explorar o código

Merge pull request #2144 from jasononeil/feature/allowdispatchsubclass

Allow Dispatch to be subclassed
Nicolas Cannasse %!s(int64=12) %!d(string=hai) anos
pai
achega
55825902eb
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      std/haxe/web/Dispatch.hx

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

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