Skip to content

test(swift): add regression coverage for typed-property receiver edges - #2163

Merged
carlos-alm merged 1 commit into
mainfrom
test/swift-typemap-receiver
Jul 29, 2026
Merged

carlos-alm merged 1 commit into
mainfrom
test/swift-typemap-receiver

Conversation

@carlos-alm

Copy link
Copy Markdown
Contributor

Summary

  • Adds an integration test verifying the WASM engine emits receiver edges from UserService methods to UserRepository — the class type of a typed private let repo: UserRepository property
  • Covers seedSwiftPropertyTypeMap (src/extractors/swift.ts), which seeds the typeMap from class-body property_declaration nodes so repo.method() calls resolve to the property's declared class, matching the native engine's match_swift_type_map
  • No source changes — this behavior already works; it just lacked a regression test

Test plan

  • npx vitest run tests/integration/issue-swift-typed-property-receiver.test.ts passes
  • npm run lint clean

Covers WASM engine seeding typeMap from class-body property_declaration
nodes (seedSwiftPropertyTypeMap) so repo.method() calls resolve receiver
edges to the property's declared class, matching the native engine.
@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds a Swift WASM integration regression test that builds a temporary graph and verifies typed UserRepository property calls produce receiver edges from all three UserService methods.

Confidence Score: 5/5

The PR appears safe to merge because it adds isolated regression coverage without changing production behavior.

The test explicitly selects the WASM engine, uses an isolated temporary graph database, verifies all intended receiver edges, and cleans up its resources after execution.

Important Files Changed

Filename Overview
tests/integration/issue-swift-typed-property-receiver.test.ts Adds focused regression coverage for receiver-edge resolution through a typed Swift class property, with appropriate temporary database cleanup.

Reviews (1): Last reviewed commit: "test(swift): add regression coverage for..." | Re-trigger Greptile

@carlos-alm
carlos-alm merged commit ea6f53c into main Jul 29, 2026
42 of 44 checks passed
@carlos-alm
carlos-alm deleted the test/swift-typemap-receiver branch July 29, 2026 00:25
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant