mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Added tests.
This commit is contained in:
1 parent
72bb1d3dec
commit
0da676d24c
5 files changed
+86
No files matched your search
+17
@@ -0,0 +1,17 @@
|
||||
// @declaration: true
|
||||
|
||||
function f(x: "foo"): number;
|
||||
function f(x: string): number {
|
||||
return 0;
|
||||
}
|
||||
|
||||
function g(x: "bar"): number;
|
||||
function g(x: string): number {
|
||||
return 0;
|
||||
}
|
||||
|
||||
let a = f;
|
||||
let b = g;
|
||||
|
||||
a = b;
|
||||
b = a;
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// @declaration: true
|
||||
|
||||
function f(x: "foo"): number;
|
||||
function f(x: "foo"): number {
|
||||
return 0;
|
||||
}
|
||||
|
||||
function g(x: "bar"): number;
|
||||
function g(x: "bar"): number {
|
||||
return 0;
|
||||
}
|
||||
|
||||
let a = f;
|
||||
let b = g;
|
||||
|
||||
a = b;
|
||||
b = a;
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// @declaration: true
|
||||
|
||||
function f(x: "foo"): number;
|
||||
function f(x: string): number {
|
||||
return 0;
|
||||
}
|
||||
|
||||
function g(x: "foo"): number;
|
||||
function g(x: string): number {
|
||||
return 0;
|
||||
}
|
||||
|
||||
let a = f;
|
||||
let b = g;
|
||||
|
||||
a = b;
|
||||
b = a;
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// @declaration: true
|
||||
|
||||
function f(x: "foo"): number;
|
||||
function f(x: "foo"): number {
|
||||
return 0;
|
||||
}
|
||||
|
||||
function g(x: "foo"): number;
|
||||
function g(x: "foo"): number {
|
||||
return 0;
|
||||
}
|
||||
|
||||
let a = f;
|
||||
let b = g;
|
||||
|
||||
a = b;
|
||||
b = a;
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// @declaration: true
|
||||
|
||||
function f(x: "foo"): number;
|
||||
function f(x: string): number;
|
||||
function f(x: string): number {
|
||||
return 0;
|
||||
}
|
||||
|
||||
function g(x: "foo"): number;
|
||||
function g(x: string): number {
|
||||
return 0;
|
||||
}
|
||||
|
||||
let a = f;
|
||||
let b = g;
|
||||
|
||||
a = b;
|
||||
b = a;
|
||||
Reference in new issue
Block a user