Returns true if this reference is compatible with the given type.
(&self, other: ExprType)
| 276 | |
| 277 | /// Returns true if this reference is compatible with the given type. |
| 278 | pub fn accepts(&self, other: ExprType) -> bool { |
| 279 | match self.ref_type { |
| 280 | None => true, |
| 281 | Some(vtype) => vtype == other, |
| 282 | } |
| 283 | } |
| 284 | |
| 285 | /// Returns true if this reference is compatible with the return type of a callable. |
| 286 | pub fn accepts_callable(&self, other: Option<ExprType>) -> bool { |