-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4121 from Microsoft/NodeFlagsOnSuperCall
always set NodeCheckFlags when checking super expression
- Loading branch information
Showing
10 changed files
with
144 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
tests/baselines/reference/superCallWithMissingBaseClass.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
tests/cases/compiler/superCallWithMissingBaseClass.ts(1,19): error TS2304: Cannot find name 'Bar'. | ||
|
||
|
||
==== tests/cases/compiler/superCallWithMissingBaseClass.ts (1 errors) ==== | ||
class Foo extends Bar { | ||
~~~ | ||
!!! error TS2304: Cannot find name 'Bar'. | ||
m1() { | ||
return super.m1(); | ||
} | ||
|
||
static m2() { | ||
return super.m2(); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
tests/baselines/reference/superCallWithMissingBaseClass.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//// [superCallWithMissingBaseClass.ts] | ||
class Foo extends Bar { | ||
m1() { | ||
return super.m1(); | ||
} | ||
|
||
static m2() { | ||
return super.m2(); | ||
} | ||
} | ||
|
||
//// [superCallWithMissingBaseClass.js] | ||
var __extends = (this && this.__extends) || function (d, b) { | ||
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
var Foo = (function (_super) { | ||
__extends(Foo, _super); | ||
function Foo() { | ||
_super.apply(this, arguments); | ||
} | ||
Foo.prototype.m1 = function () { | ||
return _super.prototype.m1.call(this); | ||
}; | ||
Foo.m2 = function () { | ||
return _super.m2.call(this); | ||
}; | ||
return Foo; | ||
})(Bar); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class Foo extends Bar { | ||
m1() { | ||
return super.m1(); | ||
} | ||
|
||
static m2() { | ||
return super.m2(); | ||
} | ||
} |