Include anonymous functions into the list of methods in DebugInfo #1391

Open
opened 2025-12-28 17:16:16 +00:00 by sami · 0 comments
Owner

Originally created by @AnnaShaleva on GitHub (Oct 17, 2024).

Current Behavior

Our compiler does not include anonymous functions into the methods list of debug info:

func PublicContractMethod() {
	var f = func() {
		runtime.Log("bla")
	}

	f()
	f()
}

See also thread under https://github.com/nspcc-dev/neo-go/issues/3559#issuecomment-2416866538.

Expected Behavior

Anonymous functions should be included into the methods list of debug info with some dynamic name that is not intersected with existing method names. A good example is given in https://github.com/nspcc-dev/neo-go/issues/3559#issuecomment-2417834451.

Possible Solution

Fix it.

Originally created by @AnnaShaleva on GitHub (Oct 17, 2024). ## Current Behavior Our compiler does not include anonymous functions into the `methods` list of debug info: ```go func PublicContractMethod() { var f = func() { runtime.Log("bla") } f() f() } ``` See also thread under https://github.com/nspcc-dev/neo-go/issues/3559#issuecomment-2416866538. ## Expected Behavior Anonymous functions should be included into the `methods` list of debug info with some dynamic name that is not intersected with existing method names. A good example is given in https://github.com/nspcc-dev/neo-go/issues/3559#issuecomment-2417834451. ## Possible Solution Fix it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neo-go#1391
No description provided.