core.pattern-target-variants
- description
- Variants a pattern can name for a target of type (the union's variants, true / false for booleans, none otherwise)
- type
Fn(type: @core.type-ast, env: @core.type-env) -> List<Record{tag: String, payload_type: Union{#none, #some(@core.type-ast)}}>
- expression
fn(type$0, env$1) => match @core.type-resolve(type: $0, env: $1) { #union(variants$10) => $10, #boolean(_) => [{tag: "true", payload_type: #none}, {tag: "false", payload_type: #none}], _ => [] }
- visibility
- public
core.pattern-target-variants (project definy, branch compiled-tests, snapshot i6TqClmqVS9FK8rKOvJ43l6Tevx8pvYJ5-zaQqNwemc) id: xYVrcnltMql4jm8eMUlSpS9SLm11DDSt3DxYFMaYbL8 content hash: iZr5_xL_Rj5i8uVcsfCfcfDe8MEy4yUDbj1IQ1p0SpI