mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
Added tests.
This commit is contained in:
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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