File tree 1 file changed +5
-4
lines changed 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -6575,12 +6575,13 @@ export class Compiler extends DiagnosticEmitter {
6575
6575
6576
6576
var expr : ExpressionRef ;
6577
6577
6578
- // traverse to the first matching constructor
6578
+ // traverse to the top-most visible constructor
6579
6579
var currentClassInstance : Class | null = classInstance ;
6580
- var constructorInstance = classInstance . constructorInstance ;
6581
- while ( ! constructorInstance && ( currentClassInstance = classInstance . base ) ) {
6580
+ var constructorInstance : Function | null = null ;
6581
+ do {
6582
6582
constructorInstance = currentClassInstance . constructorInstance ;
6583
- }
6583
+ if ( constructorInstance ) break ; // TODO: check visibility
6584
+ } while ( currentClassInstance = currentClassInstance . base ) ;
6584
6585
6585
6586
// if a constructor is present, call it with a zero `this`
6586
6587
if ( constructorInstance ) {
You can’t perform that action at this time.
0 commit comments