2014-07-13 01:04:16 +02:00
|
|
|
//// [assignmentStricterConstraints.ts]
|
|
|
|
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, "")
|
|
|
|
|
|
|
|
|
|
|
|
//// [assignmentStricterConstraints.js]
|
|
|
|
var f = function (x, y) {
|
|
|
|
x = y;
|
|
|
|
};
|
2015-02-07 03:45:09 +01:00
|
|
|
var g = function (x, y) { };
|
2014-07-13 01:04:16 +02:00
|
|
|
g = f;
|
|
|
|
g(1, "");
|