3 ms·
My understanding is that gradually typed code, i.e. using "any", introduces unsoundness. var s : String = "bar"; var a : any = s; var i : int = a;
by xxgreg 12y ago
My understanding is that gradually typed code, i.e. using "any", introduces unsoundness.
var s : String = "bar";
var a : any = s;
var i : int = a;
Not sure, but I think Typescript's assignability rules, which use structural typing, also introduce unsoundness.
class A { foo() { print('A'); } }
class B { foo() { print('B'); } }
var a : A = new A();
var b : B = a;