Disallow <T>(a => b) when parsing Flow (#13645)
This commit is contained in:
1
packages/babel-parser/test/fixtures/flow/type-generics/wrong-arrow-parens-no-jsx/input.js
vendored
Normal file
1
packages/babel-parser/test/fixtures/flow/type-generics/wrong-arrow-parens-no-jsx/input.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<T>(a => b);
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"sourceType": "module",
|
||||
"plugins": ["flow"],
|
||||
"throws": "Expected an arrow function after this type parameter declaration. (1:0)"
|
||||
}
|
||||
1
packages/babel-parser/test/fixtures/flow/type-generics/wrong-arrow-parens/input.js
vendored
Normal file
1
packages/babel-parser/test/fixtures/flow/type-generics/wrong-arrow-parens/input.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<T>(a => b);
|
||||
3
packages/babel-parser/test/fixtures/flow/type-generics/wrong-arrow-parens/options.json
vendored
Normal file
3
packages/babel-parser/test/fixtures/flow/type-generics/wrong-arrow-parens/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "Unterminated JSX contents. (1:3)"
|
||||
}
|
||||
Reference in New Issue
Block a user