Cannot use `this` keyword in type declaration

Open
#3,964 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Reproduce this in Binary Ninja 3.4.4090-dev on Windows by editing a variable or parameter type with Y and entering int this; compare that behavior with renaming via N. Trace the type-editing entry point involved in the Y flow, and consider the issue complete when valid parameter names using this are accepted without regressing ordinary type edits.

Written by the indexing model from the issue text.

Description

Component: Type Parser Effort: Low Impact: Low

Binary Ninja Version: 3.4.4090-dev
Platform: Windows 11 Version 22H2

I'm not sure if this is intended behaviour, but here it is:

  1. Try to change any variable, parameter type with Y
  2. Type something like this int this
  3. See you can not do it

We should be able to do it at least in parameters. Because there is a lot of cpp binaries that uses __thiscall convention and most of the time that functions first parameter is named this. By the way, I can rename by N, it only fails if I do it with Y.

Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

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.

More from Vector35/binaryninja-api

All issues in Vector35/binaryninja-api

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.