We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32366f5 commit 16919daCopy full SHA for 16919da
clarity/src/vm/analysis/type_checker/contexts.rs
@@ -87,14 +87,9 @@ impl TypeMap {
87
}
88
89
/// Like set_type but forcing a change if already set
90
- pub fn override_type(&mut self, expr: &SymbolicExpression, type_sig: TypeSignature) {
91
- match self.map {
92
- TypeMapDataType::Map(ref mut map) => {
93
- map.insert(expr.id, type_sig);
94
- }
95
- TypeMapDataType::Set(ref mut map) => {
96
- map.insert(expr.id);
97
+ pub fn overwrite_type(&mut self, expr: &SymbolicExpression, type_sig: TypeSignature) {
+ if let TypeMapDataType::Map(ref mut map) = self.map {
+ map.insert(expr.id, type_sig);
98
99
100
0 commit comments