selfhost: for-in support for Channel<T>; fix break/continue C codegen

- lib/Channel.bux: add Channel_Recv_Ok<T> for use in for-in desugaring
- hir_lower.bux: Channel for-in desugars to while+recv_ok pattern
- c_backend.bux: emit 'break;' / 'continue;' with semicolon, fix missing
  semicolon when break/continue inside if-block
- bootstrap/hir_lower.nim: skip generic methods in vtable generation to
  avoid referencing non-existent monomorphized C functions
This commit is contained in:
2026-06-10 13:46:06 +03:00
parent 7d6cf7f511
commit 0b887b92d3
4 changed files with 110 additions and 4 deletions
+3
View File
@@ -1717,6 +1717,9 @@ proc lowerModule*(module: Module, sema: Sema): HirModule =
var found = false
for avail in methods:
if avail.name == req.declFuncName:
# Skip generic methods — they have no concrete C function to put in vtable
if avail.decl.declFuncTypeParams.len > 0:
break
found = true
methodNames.add(req.declFuncName)
break