Skip to content

parser: fix the assertion for method calls on delegates - #25

Merged
rameel merged 1 commit into
mainfrom
parser/delegate-method-assertion
Nov 18, 2026
Merged

rameel merged 1 commit into
mainfrom
parser/delegate-method-assertion

Conversation

@rameel

@rameel rameel commented Nov 18, 2026

Copy link
Copy Markdown
Owner

Calling a method on a member of a delegate type, such as func.Invoke(1) or func.ToString(), failed an assertion in Debug builds, because the assertion expected a method to be called only on an instance that is not a delegate. An application using a Debug build of the library terminated with Assertion failed. Release builds were not affected.

This PR asserts only that an instance without a method is a delegate to invoke.

Calling a method on a member of a delegate type, such as
'func.Invoke(1)' or 'func.ToString()', failed an assertion in Debug
builds, because the assertion expected a method to be called only on
an instance that is not a delegate. An application using a Debug build
of the library terminated with "Assertion failed". Release builds were
not affected.

Assert only that an instance without a method is a delegate to invoke.
@rameel
rameel merged commit d83b6cd into main Nov 18, 2026
1 check passed
@rameel
rameel deleted the parser/delegate-method-assertion branch November 18, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant