File tree 1 file changed +12
-7
lines changed
1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -505,7 +505,7 @@ export class Resolver extends DiagnosticEmitter {
505
505
}
506
506
break ;
507
507
}
508
- case ElementKind . CLASS : { // element access on element access
508
+ case ElementKind . CLASS : {
509
509
let indexedGet = ( < Class > target ) . lookupOverload ( OperatorKind . INDEXED_GET ) ;
510
510
if ( ! indexedGet ) {
511
511
if ( reportMode == ReportMode . REPORT ) {
@@ -516,13 +516,18 @@ export class Resolver extends DiagnosticEmitter {
516
516
}
517
517
return null ;
518
518
}
519
- let returnType = indexedGet . signature . returnType ;
520
- if ( target = returnType . classReference ) {
521
- this . currentThisExpression = targetExpression ;
522
- this . currentElementExpression = elementAccess . elementExpression ;
523
- return target ;
519
+ if ( targetExpression . kind == NodeKind . ELEMENTACCESS ) { // nested element access
520
+ let returnType = indexedGet . signature . returnType ;
521
+ if ( target = returnType . classReference ) {
522
+ this . currentThisExpression = targetExpression ;
523
+ this . currentElementExpression = elementAccess . elementExpression ;
524
+ return target ;
525
+ }
526
+ return null ;
524
527
}
525
- break ;
528
+ this . currentThisExpression = targetExpression ;
529
+ this . currentElementExpression = elementAccess . elementExpression ;
530
+ return target ;
526
531
}
527
532
}
528
533
if ( reportMode == ReportMode . REPORT ) {
You can’t perform that action at this time.
0 commit comments