feat: specialize generic type and value parameters

This commit is contained in:
2026-10-26 13:10:52 +01:00
parent 9058135326
commit 6886d743b5
18 changed files with 2499 additions and 103 deletions
+8
View File
@@ -107,6 +107,10 @@ Code :: enum {
catch_type_mismatch
errdefer_outside_fallible
cleanup_control_flow
comptime_argument_required
cannot_infer_generic
specialization_cycle
specialization_limit
}
Diagnostic :: struct {
@@ -235,5 +239,9 @@ messages :: $enummap.init(Code, []u8, {
catch_type_mismatch = "catch handler must produce the success type or terminate",
errdefer_outside_fallible = "errdefer requires an enclosing fallible function",
cleanup_control_flow = "cleanup cannot escape with return, break, continue, or try",
comptime_argument_required = "generic argument must be a compile-time value",
cannot_infer_generic = "cannot infer consistent compile-time arguments from runtime arguments",
specialization_cycle = "compile-time specialization depends on its unfinished result",
specialization_limit = "compile-time specialization exceeds its recursion or instance limit",
})