forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/Microsoft/TypeScript into…
… anyFunctionTypeDontAddCandidate Conflicts: src/compiler/types.ts
- Loading branch information
Showing
12 changed files
with
144 additions
and
49 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
tests/cases/compiler/classExtendsNull.ts(2,5): error TS17005: A constructor cannot contain a 'super' call when its class extends 'null' | ||
|
||
|
||
==== tests/cases/compiler/classExtendsNull.ts (1 errors) ==== | ||
class C extends null { | ||
constructor() { | ||
~~~~~~~~~~~~~~~ | ||
super(); | ||
~~~~~~~~~~~~~~~~ | ||
return Object.create(null); | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
} | ||
~~~~~ | ||
!!! error TS17005: A constructor cannot contain a 'super' call when its class extends 'null' | ||
} | ||
|
||
class D extends null { | ||
constructor() { | ||
return Object.create(null); | ||
} | ||
} |
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,35 @@ | ||
//// [classExtendsNull.ts] | ||
class C extends null { | ||
constructor() { | ||
super(); | ||
return Object.create(null); | ||
} | ||
} | ||
|
||
class D extends null { | ||
constructor() { | ||
return Object.create(null); | ||
} | ||
} | ||
|
||
//// [classExtendsNull.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 C = (function (_super) { | ||
__extends(C, _super); | ||
function C() { | ||
_super.call(this); | ||
return Object.create(null); | ||
} | ||
return C; | ||
})(null); | ||
var D = (function (_super) { | ||
__extends(D, _super); | ||
function D() { | ||
return Object.create(null); | ||
} | ||
return D; | ||
})(null); |
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
Oops, something went wrong.