MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / constructor_call_target

Method constructor_call_target

crates/hll-to-ir/src/monomorphize.rs:1749–1762  ·  view source on GitHub ↗

A payload-variant constructor call (`Some(x)`). Returns the mangled variant name and the concrete payload types to use as expected types for arguments.

(
        &self,
        name: &str,
        expected: Option<&Type>,
        arity: usize,
    )

Source from the content-addressed store, hash-verified

1747 let DeclNode::Function {
1748 name,
1749 generics,
1750 bounds,
1751 params,
1752 return_type,
1753 body,
1754 ..
1755 } = &mut declaration.decl
1756 else {
1757 unreachable!();
1758 };
1759 *name = specialized_name(base_name, type_args);
1760 generics.clear();
1761 bounds.clear();
1762 for param in params {
1763 param.ty = substitute_type(&param.ty, substitutions);
1764 }
1765 if let Some(ReturnType::Single(ty)) = return_type {

Callers 1

rewrite_expr_usesMethod · 0.80

Calls 3

expected_enum_nameFunction · 0.85
constructor_targetMethod · 0.80
payload_typesMethod · 0.80

Tested by

no test coverage detected