Type checker doesn't assign types to subexprs on exprs with types
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mars |
Fix Released
|
High
|
Matt Giuca |
Bug Description
Typically, expressions come to the type checker without types (as the parser is too lazy/stupid to assign them). However, the parser does assign some expressions types (notably, string literals, as a fix for bug #483369). If the type checker receives an expr with a type, it will a) believe it (which may be foolish), and b) not recurse and assume the subexpressions also have types. This is not always the case, as string literals, for example, do not assign a type to their subexpressions.
Rather than fixing the parser to assign types to subexpressions, instead have the type checker check the type of the expression regardless, and recurse, and also unify it with the already-assigned type (this will identify any mistakes in the existing type allocations, and be more robust).
Blocking bug #574108.
Related branches
Changed in mars: | |
status: | Fix Committed → Fix Released |
Fixed in trunk r1028.