pub fn check_context_constraints(
typed: &TypedCommons,
consumed_types: &HashMap<String, ConsumedType>,
local_type_names: &HashSet<String>,
tys: &Arc<Types>,
) -> Vec<CompileError>Expand description
Enforce v0.4 construction rules: types owned by a consumed context can be
referenced (held, passed, read for transparent exports) but cannot be
constructed. This catches OtherType { ... }, OtherType.of(...),
OtherType.unsafe(...), and OtherType.Variant(...) expressions where
OtherType is from a consumed context.