-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
A literal node may be the single literal hanging off of a named constant declaration, like pi in this example:
const pi = 3.1415926535
Here, pi is untyped. If SetType is called on its literal then suddenly all references to pi in the remainder of the check will be typed. This is not obvious and will be very hard to debug if it becomes an issue. SetType is dangerous. Instead, we should return a new literal node with the given type.