2014-07-13 01:04:16 +02:00
|
|
|
//// [assignmentToReferenceTypes.ts]
|
|
|
|
// Should all be allowed
|
|
|
|
|
|
|
|
module M {
|
|
|
|
}
|
|
|
|
M = null;
|
|
|
|
|
|
|
|
class C {
|
|
|
|
}
|
|
|
|
C = null;
|
|
|
|
|
|
|
|
enum E {
|
|
|
|
}
|
|
|
|
E = null;
|
|
|
|
|
|
|
|
function f() { }
|
|
|
|
f = null;
|
|
|
|
|
|
|
|
var x = 1;
|
|
|
|
x = null;
|
|
|
|
|
|
|
|
function g(x) {
|
|
|
|
x = null;
|
|
|
|
}
|
|
|
|
|
|
|
|
//// [assignmentToReferenceTypes.js]
|
2014-08-19 19:43:13 +02:00
|
|
|
// Should all be allowed
|
2014-07-13 01:04:16 +02:00
|
|
|
M = null;
|
|
|
|
var C = (function () {
|
|
|
|
function C() {
|
|
|
|
}
|
|
|
|
return C;
|
|
|
|
})();
|
|
|
|
C = null;
|
|
|
|
var E;
|
|
|
|
(function (E) {
|
|
|
|
})(E || (E = {}));
|
|
|
|
E = null;
|
|
|
|
function f() {
|
|
|
|
}
|
|
|
|
f = null;
|
|
|
|
var x = 1;
|
|
|
|
x = null;
|
|
|
|
function g(x) {
|
|
|
|
x = null;
|
|
|
|
}
|