Pārlūkot izejas kodu

don't double-throw all exceptions

closes #11175
Simon Krajewski 1 gadu atpakaļ
vecāks
revīzija
dbc9952adf

+ 1 - 1
src/filters/exceptions.ml

@@ -179,7 +179,7 @@ let throw_native ctx e_thrown t p =
 		else
 			e_thrown
 	in
-	mk (TThrow e_native) t p
+	e_native
 
 let set_needs_exception_stack v =
 	if not (Meta.has Meta.NeedsExceptionStack v.v_meta) then

+ 11 - 0
tests/optimization/src/issues/Issue11175.hx

@@ -0,0 +1,11 @@
+package issues;
+
+class Issue11175 {
+	@:js('
+		throw haxe_Exception.thrown("foo");
+	')
+	@:analyzer(ignore)
+	static function test() {
+		throw "foo";
+	}
+}