From a99852084ff6f0491734d508a4dcd2e7d8411814 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Sat, 17 Oct 2026 06:04:11 +0000 Subject: feat(classes): warn when method declarations shadow fields Retain parameter source lines for warnings and preserve field access prefix validation when distinguishing fields from methods. Co-Authored-By: Claude Fable 5.1 --- include/cps/CodeGen.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/cps/CodeGen.h') diff --git a/include/cps/CodeGen.h b/include/cps/CodeGen.h index 1c80434..593cde0 100644 --- a/include/cps/CodeGen.h +++ b/include/cps/CodeGen.h @@ -43,6 +43,7 @@ class CodeGen { std::vector ConstantScopes = {{0, {}}}; unsigned NextScopeID = 1; void emitScopedBlock(const std::vector> &Body); + void warnMemberShadow(const std::string &Name, int Line) const; bool prepareSymbolDeclaration(const std::string &Name, bool IsConstant = false); bool requireWritable(const SymbolInfo &Info, const std::string &Name); void emitConstantStmt(ConstantStmtAST *Stmt); -- cgit v1.3.1-4-g156e