isTypeOfExpression is broken #20875
Labels
API
Relates to the public API for TypeScript
Bug
A bug in TypeScript
Fixed
A PR has been merged for this issue
Good First Issue
Well scoped, documented and has the green light
Help Wanted
You can do this
Milestone
TypeScript Version: 2.6.2
Code
Expected behavior:
ts.isTypeofExpression
should returntrue
(only) forTypeOfExpression
nodes.Actual behavior:
It returns
true
forAwaitExpression
nodes instead.Reason
The nodes both get created correctly (
TypeOfExpression
has kind189
like it should), but the generated code forisTypeOfExpression
uses the wrong number forkind
: (fromtsc.ts
, starting on line 9132)Note that some code uses the correct
kind
:Note that this issue also exists on master, even though the numbers for
SyntaxKind
enum values have changed.I couldn't find where this code gets generated, so I haven't been able to investigate further.
The text was updated successfully, but these errors were encountered: