UnitTestBot / UnitTestBot/usvm

[ts] Handle field ref that refer to the method

Open
#298 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
33
Forks
27
Avg merge
4d 3h
Merged PRs (30d)
15

Description

We need to handle InstanceFieldRef when "field" is actually a method. For example, obj.callback = this.doAction. Currently, the field resolution fails due to the absence of doAction field among EtsClass::fields, since it is in EtsClass::methods.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in usvm-ts/src/main/kotlin/org/usvm/util/EtsFieldResolver.kt at the field-resolution logic around line 61, then inspect how EtsClass::fields and EtsClass::methods are represented. Confirm that an InstanceFieldRef such as obj.callback = this.doAction resolves when doAction is a method rather than a field.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.