New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Throw a syntax error for a constructor with type parameters #12065
Conversation
sosukesuzuki
commented
Sep 16, 2020
•
edited by gitpod-io
bot
edited by gitpod-io
bot
Q | A |
---|---|
Fixed Issues? | Fixes #12064 |
Patch: Bug Fix? | Maybe yes |
Major: Breaking Change? | No |
Minor: New Feature? | No |
Tests Added + Pass? | Yes |
Documentation PR Link | |
Any Dependency Changes? | |
License | MIT |
@@ -420,3 +420,4 @@ withStatement.ts | |||
withStatementErrors.ts | |||
withStatementInternalComments.ts | |||
withStatementNestedScope.ts | |||
parserConstructorDeclaration12.ts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class C {
constructor<>() { }
constructor<> () { }
constructor <>() { }
constructor <> () { }
constructor< >() { }
constructor< > () { }
constructor < >() { }
constructor < > () { }
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update this line:
Line 3 in bbe0cf0
TYPESCRIPT_COMMIT = ffa35d3272647fe48ddf173e1f0928f772c18630 |
to update the TS tests?
And then run
make test-typescript-update-allowlist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've fixed at 7a02112! But I'm not familiar with how babel-parser tests work, so I'm not sure if it's correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's correct! Btw, allowlist
contain tests that we don't pass and not tests that we are correctly handling.
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/28463/ |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 7a02112:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Update allowlist.txt
c7fa9bd
to
7a02112
Compare
The CI error is not related. I will address it in a separate PR. |
* Install babel/parser 7.12 * Add tests for babel/babel#12161 * Add test for babel/babel#12076 * Add test for babel/babel#12085 * Add test for babel/babel#12108 * Add test for babel/babel#12120 * Add test for babel/babel#12054 * Add test for babel/babel#12061 * Add test babel/babel#12093 * Add test for babel/babel#12065 * Add test for babel/babel#12111 * Add test for babel/babel#12072 * Switch syntax-module-attributes to syntax-import-assertion * Support "String import/export specifier" * Remove tests for module-attributes * Add changelog * Update to 7.12.3 * Fix by linter * Fix by spellchecker * Add tests for module attributes to errors * Add error test for module string name with import * Remove TSTypeCastExpression * Add tests for funny import-assertions * Update snapshots| * Add more tests