source-academy/js-slang

Function types in Source Typed

Opened this issue · 0 comments

Should declarations inherit the type of their right-hand side?

Example:

let a: number = 1;

let b = a;

b = "a string";

does not give a type error in Source Typed.