morpho
morpho copied to clipboard
Type checking
This PR implements type checking in morpho. Declare a variable with a restricted type as follows:
Int a = 5
The morpho compiler will now ensure that anything assigned to this variable meets the type restriction. This is done through a combination of compile time checking (using type inference) and runtime (dynamic) checking.