File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -7533,7 +7533,8 @@ namespace ts {
7533
7533
return ;
7534
7534
case SyntaxKind . Parameter :
7535
7535
if ( ( < ParameterDeclaration > token . parent ) . name === token ) {
7536
- return ClassificationType . parameterName ;
7536
+ const isThis = token . kind === SyntaxKind . Identifier && ( < Identifier > token ) . originalKeywordKind === SyntaxKind . ThisKeyword ;
7537
+ return isThis ? ClassificationType . keyword : ClassificationType . parameterName ;
7537
7538
}
7538
7539
return ;
7539
7540
}
Original file line number Diff line number Diff line change
1
+ /// <reference path="fourslash.ts"/>
2
+
3
+ ////function f(this){}
4
+
5
+ var c = classification ;
6
+ verify . syntacticClassificationsAre (
7
+ c . keyword ( "function" ) ,
8
+ c . identifier ( "f" ) ,
9
+ c . punctuation ( "(" ) ,
10
+ c . keyword ( "this" ) ,
11
+ c . punctuation ( ")" ) ,
12
+ c . punctuation ( "{" ) ,
13
+ c . punctuation ( "}" ) ) ;
You can’t perform that action at this time.
0 commit comments