TypL
TypL copied to clipboard
Compiler: basic transforms
-
Compiler insert parameter type assertions (and remove the annotations)
function foo(x = int, y = bool`true`) { .. }
→
function foo(x,y = true) { x = int`${x}`; y = bool`${y}`; .. }
-
Validate runtime type assertions (only literals) during checker
-
bool`1`;
should error - Compiler remove any of these runtime assertions that are checker validated
-