Type-check a single constant. Clears per-constant caches first.
(&mut self, id: &KId<M>)
| 71 | |
| 72 | /// Type-check a single constant. Clears per-constant caches first. |
| 73 | pub fn check_const(&mut self, id: &KId<M>) -> Result<(), TcError<M>> |
| 74 | where |
| 75 | M::MField<Vec<ix_common::env::Name>>: CheckDupLevelParams, |
| 76 | { |
| 77 | let c = self.get_const(id)?; |
| 78 | if let Some(block) = self.coordinated_block_for(&c)? { |
| 79 | if let Some(result) = self.env.block_check_results.get(&block).cloned() { |
| 80 | return result; |
| 81 | } |
| 82 | let result = self.check_block_body(&block, id); |
| 83 | self.env.block_check_results.insert(block, result.clone()); |
| 84 | return result; |
| 85 | } |
| 86 | |
| 87 | self.check_const_member_fresh(id) |
| 88 | } |
| 89 | |
| 90 | fn check_const_member_fresh(&mut self, id: &KId<M>) -> Result<(), TcError<M>> |
| 91 | where |