Runner: G2 finds the FUNCTION statement after local classes; budget floor applied to all tasks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
This commit is contained in:
@@ -248,7 +248,9 @@ class Runner:
|
||||
g2 = False
|
||||
g2_detail.append(f"{c['name']}: does not implement {c['implements']}")
|
||||
if c["type"] == "FUNC": # signature: every parameter with its type in the FUNCTION header
|
||||
header = src.split(".", 1)[0]
|
||||
# the FUNCTION statement, not the first statement: local classes can come before it (G0107)
|
||||
fm = re.search(rf"^\s*FUNCTION\s+{re.escape(c['name'])}\b[^.]*\.", src, re.I | re.M)
|
||||
header = fm.group(0) if fm else src.split(".", 1)[0]
|
||||
for prm in c.get("params", []):
|
||||
if not re.search(rf"\b{re.escape(prm['name'])}\b\)?\s+TYPE\s+{re.escape(prm['type'])}\b",
|
||||
header, re.I):
|
||||
|
||||
Reference in New Issue
Block a user