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

Function match_payload_variant_dispatch

tests/integration/hll_conformance.rs:1009–1037  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1007 return unbox(boxed)
1008}
1009"#,
1010 42,
1011 );
1012}
1013
1014#[test]
1015fn generic_function_rejects_conflicting_inference() {
1016 assert_compile_fails(
1017 r#"
1018first: <T>(left: T, right: T) -> T {
1019 return left
1020}
1021
1022main: () -> i32 {
1023 return first(42, true)
1024}
1025"#,
1026 );
1027}
1028
1029#[test]
1030fn generic_record_specializations_have_distinct_layouts() {
1031 assert_exit(
1032 r#"
1033struct Box<T> {
1034 value: T
1035}
1036
1037main: () -> i32 {
1038 small: Box<i32>* = new(Box<i32>)
1039 wide: Box<i64>* = new(Box<i64>)
1040 small.value = 17

Callers

nothing calls this directly

Calls 1

assert_exitFunction · 0.85

Tested by

no test coverage detected