We have a runtime type-checker that is incomplete - it passes when we expect a TList<Int> and we have a DList with non-Ints in it.

At one point, our type-checker was recursive in that it would look at all values within structures such as lists, to ensure types match, but this recursive nature was very slow, so we gutted it.

Recent efforts have been made to do much of this type-checking upon construction, such that:

In most places throughout our codebase, it’s clear what the ValueType(s) of a Dval should be, and we can

In other cases, we determine the appropriate ValueTypes dynamically, and fail if attempts are made at creating invalid/inconsistent Dvals

We are currently pretty close to completing this effort, but some problems remain: