Insert or overwrite a variable's types.
(&mut self, var_name: &str, types: Vec<ResolvedType>)
| 1857 | |
| 1858 | /// Insert or overwrite a variable's types. |
| 1859 | pub fn set(&mut self, var_name: &str, types: Vec<ResolvedType>) { |
| 1860 | if types.is_empty() { |
| 1861 | return; |
| 1862 | } |
| 1863 | self.locals.insert(atom(var_name), types); |
| 1864 | } |
| 1865 | |
| 1866 | /// Record that a variable exists in scope with an empty type list. |
| 1867 | /// This prevents the variable from appearing unseen by the forward |
no test coverage detected