Added tests.

This commit is contained in:
Daniel Rosenwasser
2015-12-28 15:08:14 -05:00
parent 72bb1d3dec
commit 0da676d24c
5 changed files with 86 additions and 0 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;