which is invalid. This only happens for the outermost function, so it should be relatively easy to add special handling for this case. We should also report this to Safari, it seems to be in violation of the ECMA spec:
If the object was defined using ECMAScript code and the returned string representation is not in the form of a MethodDefinition or GeneratorMethod then the representation must be such that if the string is evaluated, using eval in a lexical context that is equivalent to the lexical context used to create the original object, it will result in a new functionally equivalent object.
Safari serializes async arrow functions to
which is invalid. This only happens for the outermost function, so it should be relatively easy to add special handling for this case. We should also report this to Safari, it seems to be in violation of the ECMA spec: