swc_ecma_compat_bugfixes

Function async_arrows_in_class

source
pub fn async_arrows_in_class(unresolved_mark: Mark) -> impl Pass
Expand description

A bugfix pass for Safari 10.3.

Safari 10.3 had an issue where async arrow function expressions within any class method would throw. After an initial fix, any references to the instance via this within those methods would also throw. This is fixed by converting arrow functions in class methods into equivalent function expressions. See https://bugs.webkit.org/show_bug.cgi?id=166879