File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
Expand file tree Collapse file tree 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 {
505505 }
506506 break ;
507507 }
508- case ElementKind . CLASS : { // element access on element access
508+ case ElementKind . CLASS : {
509509 let indexedGet = ( < Class > target ) . lookupOverload ( OperatorKind . INDEXED_GET ) ;
510510 if ( ! indexedGet ) {
511511 if ( reportMode == ReportMode . REPORT ) {
@@ -516,13 +516,18 @@ export class Resolver extends DiagnosticEmitter {
516516 }
517517 return null ;
518518 }
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 ;
524527 }
525- break ;
528+ this . currentThisExpression = targetExpression ;
529+ this . currentElementExpression = elementAccess . elementExpression ;
530+ return target ;
526531 }
527532 }
528533 if ( reportMode == ReportMode . REPORT ) {
You can’t perform that action at this time.
0 commit comments