From 699e18b65b07af73ccd14b28f83572b1843c7d37 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Wed, 14 Oct 2026 03:29:04 +0000 Subject: feat(types): add native C scalar types and imported aliases Co-Authored-By: Claude Fable 5.1 --- lib/CodeGen/FunctionGen.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/CodeGen/FunctionGen.cc') diff --git a/lib/CodeGen/FunctionGen.cc b/lib/CodeGen/FunctionGen.cc index afa6074..480d9ba 100644 --- a/lib/CodeGen/FunctionGen.cc +++ b/lib/CodeGen/FunctionGen.cc @@ -117,6 +117,12 @@ Function *FunctionGen::emitPrototype(PrototypeAST *Proto) { std::vector ArgTypes; for (const ParamDecl &P : Proto->getParams()) { + const TypeInfo *Info = Types.resolve(P.TypeName); + if (Info && Info->isVoid()) { + fprintf(stderr, "error: parameter %s cannot have void type\n", P.Name.c_str()); + HadError = true; + return nullptr; + } ParamSig PS; PS.TypeName = P.TypeName; PS.IsByRef = P.Mode == PassMode::ByRef; -- cgit v1.3.1-4-g156e