TypeScript/tests/cases/compiler/assignmentStricterConstraints.ts

9 lines
137 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
var f = function <T, S extends T>(x: T, y: S): void {
x = y
}
var g = function <T, S>(x: T, y: S): void { }
g = f
g(1, "")