TypeScript/tests/baselines/reference/assignFromBooleanInterface2.js

35 lines
423 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [assignFromBooleanInterface2.ts]
interface Boolean {
doStuff(): string;
}
interface NotBoolean {
doStuff(): string;
}
var x = true;
var a: Boolean;
var b: NotBoolean;
a = x;
a = b;
b = a;
b = x;
x = a; // expected error
x = b; // expected error
//// [assignFromBooleanInterface2.js]
var x = true;
var a;
var b;
a = x;
a = b;
b = a;
b = x;
x = a; // expected error
x = b; // expected error