Delphi parser drops every class member after a `const [ref]` parameter
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 60/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- tooling
Direzione di ricerca
Start by reproducing with the Min.pas file from the issue in an empty directory, running codegraph init -y . then codegraph node TMin and codegraph query ''. The payload does not name the parser source files, so locate the Delphi class-declaration parsing and how it reads method parameter lists, then compare the const [ref] case with the control that has the decoration removed. Done means TMin lists Before, WithRef and After, TMin.After resolves, and no AValue field is indexed.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
In a Delphi (Object Pascal) unit, a method declared with a const [ref] parameter followed by another
parameter ends the class declaration for the parser: the [ref] method is lost, the parameter after it
is recorded as a field of the class, every member declared after it is missing from the index, and the
qualified names of those members (node TClass.Method) answer "not found". Parsing resumes at the next
class declaration.
Versions
codegraph --version: 1.6.0 (global install).npx -y @colbymchenry/[email protected]: same result on the same file.- Windows 10 Pro 10.0.19045; Node from the global npm install.
Minimal reproduction
Min.pas:
unit Min;
interface
type
TMin = class
public
procedure Before;
procedure WithRef(const [ref] AValue: Integer; const AOther: string);
procedure After;
end;
TNext = class
public
procedure Other;
end;
const
CAfterClass = 1;
implementation
procedure TMin.Before;
begin
end;
procedure TMin.WithRef(const [ref] AValue: Integer; const AOther: string);
begin
end;
procedure TMin.After;
begin
Before;
end;
procedure TNext.Other;
begin
end;
end.
Steps, in a directory holding only that file:
codegraph init -y .
codegraph node TMin
codegraph node TMin.After
codegraph node TNext
codegraph query '' --limit 50
Observed (1.6.0):
● 8 nodes, 7 edges
**Members (2):**
- Before (method):8
- AValue (field):9
Symbol "TMin.After" not found in the codebase
TNext lists Other (method):15, so parsing resumes at the next class. query '' lists AValue as a
field at :9, Before, CAfterClass, Other, TMin, TNext — no WithRef, no After.
Expected: TMin with three methods Before, WithRef, After; TMin.After resolving; no field AValue.
Control: the same file with [ref] removed (procedure WithRef(const AValue: Integer; const AOther: string);)
indexes with TMin listing all three methods and TMin.After resolving.
A [ref] parameter that is the last one in its list (procedure WithRef(const [ref] AValue: Integer);)
loses only that method and shifts the next member's recorded line by one (After (method):9 for a
declaration at line 10).
Note on the syntax
const [ref] is Delphi's "pass by reference even for small types" parameter decoration (documented under
Parameters (Delphi) — constant parameters, the [Ref] attribute). It appears in interface and
implementation declarations alike.
- Lingua principale
- C
- Stelle
- 73.2k
- Fork
- 4.7k
- Merge medio
- 4h 46m
- PR unite (30g)
- 478
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di colbymchenry/codegraph
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
colbymchenry/codegraph#2634 ·
I maintainer di solito rispondono entro 1 giorno
-
Windows: bundled Node v24.16.0 can abort at exit (nodejs/node#56645); please bundle Node >= 24.20.0Forse già presa @Ancienttwo l’ha presa 4 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
colbymchenry/codegraph#2617 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Invalid regular expression: /\boperator++\s*(?:<[^<>()]*>)?\s*\(/: Nothing to repeat (v1.6.2)Aperta
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 72/100
colbymchenry/codegraph#2482 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
codegraph ui - does not workAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
colbymchenry/codegraph#1900 · 2 commenti · 5 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
colbymchenry/codegraph#1700 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di colbymchenry/codegraph
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
quickjs-ng/quickjs#1836 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
open-quantum-safe/liboqs#2637 ·
I maintainer di solito rispondono entro 1 giorno
-
Go device SDK: Whisper transcriber keeps buffering and transcribing audio appended after Stop()Forse già presa @apoorvdarshan l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
BasedHardware/omi#22770 ·
I maintainer di solito rispondono entro 1 giorno
-
fido_do_ecdh() reports any getKeyAgreement failure as FIDO_ERR_INTERNALForse già presa @brlumen l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
joncampbell123/dosbox-x#6698 ·
I maintainer di solito rispondono entro 1 giorno