aboutsummaryrefslogtreecommitdiff
path: root/lib/Parser/ParserFunction.cc
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-17 06:04:11 +0000
committer_ov4 <ov4@ov4.org>2026-10-17 06:04:11 +0000
commita99852084ff6f0491734d508a4dcd2e7d8411814 (patch)
treefc849f47b5d657c2cfe1d4b0648725ff2a308299 /lib/Parser/ParserFunction.cc
parent3425b95cb654f8e1adc98365a4b370aa1fff8b4d (diff)
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 <noreply@anthropic.com>
Diffstat (limited to 'lib/Parser/ParserFunction.cc')
-rw-r--r--lib/Parser/ParserFunction.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Parser/ParserFunction.cc b/lib/Parser/ParserFunction.cc
index 1aef756..ad187c8 100644
--- a/lib/Parser/ParserFunction.cc
+++ b/lib/Parser/ParserFunction.cc
@@ -51,6 +51,7 @@ std::optional<std::vector<ParamDecl>> Parser::ParsePrototypeArgs(bool AllowByRef
return std::nullopt;
}
ParamDecl P;
+ P.Line = Lex.getLine();
P.Name = Lex.IdentifierStr;
P.Mode = Current;
getNextToken();