Input Code
export async function foo() {}
export default async function bar() {}
See https://astexplorer.net/#/V8ggvAMIw1
Babylon/Babel Configuration
Experimenting on AST explorer with babylon6-6.13.1 and all default options.
Expected Behavior
The second line should be parsed as an ExportDefaultDeclaration and a FunctionDeclaration.
Current Behavior
The second line is being parsed as an ExportDefaultDeclaration and a FunctionExpression.
A named export with a function declaration leads to FunctionDeclaration whenever it's regular, async or generator function.
But a default export with a function declaration leads to FunctionDeclaration only when it's regular or generator function. Async functions lead to FunctionExpression. I guess that's a bug.