2016-10-15 03:10:34 +02:00
|
|
|
// @target: es6
|
|
|
|
|
|
|
|
var v0: null;
|
|
|
|
var v1: undefined;
|
|
|
|
|
|
|
|
function f0(): null { return null; }
|
|
|
|
function f1(): undefined { return undefined; }
|
|
|
|
|
|
|
|
var f2 = function (): null { return null; }
|
|
|
|
var f3 = function (): undefined { return undefined; }
|
|
|
|
|
|
|
|
var f4 = (): null => null;
|
|
|
|
var f5 = (): undefined => undefined;
|
|
|
|
|
|
|
|
function f6(p0: null) { }
|
|
|
|
function f7(p1: undefined) { }
|
|
|
|
|
2016-10-16 02:29:03 +02:00
|
|
|
var f8 = function (p2: null) { }
|
|
|
|
var f9 = function (p3: undefined) { }
|
|
|
|
|
|
|
|
var f10 = (p4: null) => { }
|
|
|
|
var f11 = (p5: undefined) => { }
|
|
|
|
|
|
|
|
class C1 {
|
2016-10-15 03:10:34 +02:00
|
|
|
m0(): null { return null; }
|
|
|
|
m1(): undefined { return undefined; }
|
|
|
|
|
2016-10-16 02:29:03 +02:00
|
|
|
m3(p6: null) { }
|
|
|
|
m4(p7: undefined) { }
|
|
|
|
|
2016-10-15 03:10:34 +02:00
|
|
|
get a0(): null { return null; }
|
|
|
|
get a1(): undefined { return undefined; }
|
2016-10-16 02:29:03 +02:00
|
|
|
|
|
|
|
set a2(p8: null) { }
|
|
|
|
set a3(p9: undefined) { }
|
2016-10-15 03:10:34 +02:00
|
|
|
}
|
|
|
|
|
2016-10-16 02:29:03 +02:00
|
|
|
class C2 { constructor(p10: null) { } }
|
|
|
|
class C3 { constructor(p11: undefined) { } }
|
2016-10-15 03:10:34 +02:00
|
|
|
|
2016-10-16 02:29:03 +02:00
|
|
|
class C4 {
|
|
|
|
f1;
|
|
|
|
constructor(p12: null) { }
|
|
|
|
}
|
|
|
|
|
|
|
|
class C5 {
|
|
|
|
f2;
|
|
|
|
constructor(p13: undefined) { }
|
|
|
|
}
|
|
|
|
|
|
|
|
var C6 = class { constructor(p12: null) { } }
|
|
|
|
var C7 = class { constructor(p13: undefined) { } }
|
|
|
|
|
|
|
|
declare function fn<T>();
|
2016-10-15 03:10:34 +02:00
|
|
|
fn<null>();
|
|
|
|
fn<undefined>();
|
|
|
|
|
2016-10-16 02:29:03 +02:00
|
|
|
declare class D<T> {}
|
|
|
|
new D<null>();
|
|
|
|
new D<undefined>();
|