Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

[TS] Invoke declared class getters during property reads

Offen
#577 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
15/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
kotlin, typescript

Rechercherichtung

Start from the probe wrapper and cases/matrix/target.ts, then trace how a property read on new Matrix(...) is lowered in the TypeScript frontend and IR to see why get rows(), get cols() and get data() fall back to _rows, _cols and _data. Run the Matrix scenario and check that Matrix.get and Matrix.isValidIndex are entered as expected. Done means getter bodies are entered on property reads, with receiver, effects, exceptions and inheritance matching native execution.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

The original Matrix class now reaches ordinary execution after UnitTestBot/jacodb#448, but a fixed ordinary access produces an unreported semantic mismatch. Found during #575, linked to the real-class two-phase PBT/USVM plan #345.

Exact source: the unchanged frozen cases/matrix/target.ts from pbt-large-class-rerun-20261016. SHA-256: 3c4f790554d52f6da1913e2d3826e04b3de45e6271bc11e3bb21c15b96d7396c. Probe wrapper:

import { Matrix } from './target';
export function scenario(): number {
    return new Matrix([[1, 2], [3, 4]]).get(1, 0);
}

USVM base e56cea501, official immutable JacoDB snapshot 0fac32c8c5 (full source commit 0fac32c8c511c6228c3d6897262dc0924635af44), plus narrow marker-aware consumer changes from #575. Native TypeScript execution returns 3. Symbolic execution returns one terminal TsUndefined, EXHAUSTED, engineFailed=false, unsupportedCall=false, and empty unsupportedPaths.

Observed entered statements by method: %dflt.scenario=23, Matrix.constructor=23, Matrix.%instInit=4, Matrix.get=11, Matrix.isValidIndex=13. The source defines get rows(), get cols(), and get data() backed by _rows, _cols, and _data; none of those getter bodies is entered. Property reads currently follow ordinary field storage and fail to invoke the declared accessor. This silently changes isValidIndex and consequently the return from get.

Bounded fix: preserve the declared getter identity through frontend/IR, invoke the getter with the actual receiver on property reads, and preserve getter effects, thrown exceptions, and inherited lookup. Preserve existing setter behavior and explicitly reject unsupported accessor forms. Do not treat the missing accessor as an ordinary missing field. A general Symbol implementation is outside this issue.

Validation should include a minimal class getter source regression plus native replay for receiver/effects/inheritance, and the unchanged Matrix scenario above. Evidence artifact in this task: pbt-computed-members-preflight-20261016/{source-hashes.json,comparison.json,symbolic-results.json,native-results.json}.

Vorherrschende Sprache
Kotlin
Sterne
33
Forks
27
Ø Merge
3 T. 21 Std.
Gemergte PRs (30 T.)
88

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus UnitTestBot/usvm

Alle Issues in UnitTestBot/usvm

Ähnliche Issues

Weitere Issues zu Kotlin

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.