Skip to content

Conversation

@User0332
Copy link
Contributor

@User0332 User0332 commented Dec 3, 2025

Fixes #2821.

Solution

Uses the suggested solution from #2821, using base.MethodName for instance methods, FQTypeName.MethodName for static methods, and prefixing all type/namespace names with the global:: namespace prefix to avoid accidentally referencing methods with names like System or BenchmarkDotNet.

Adds a new test that ensures the method names System and BenchmarkDotNet can be used as benchmark method names.

@timcassell
Copy link
Collaborator

It may not be strictly necessary, but we should probably also use this. to reference members of the generated class within itself. e.g. this.__Overhead, etc.

@timcassell
Copy link
Collaborator

Need to fix merge conflicts

@User0332
Copy link
Contributor Author

User0332 commented Dec 8, 2025

I might not be able to get to this for a bit so if anyone who is seeing this wants to build off this PR & finish it up I'd be open to that

@timcassell timcassell force-pushed the fix-issue-2821-retry branch 3 times, most recently from 6c883d0 to c0f76ca Compare December 8, 2025 11:29
Fix missing prefixes.
Update Params and Arguments.
Remove ValidateNamingConflicts and test more name conflicts.
@timcassell timcassell force-pushed the fix-issue-2821-retry branch from c0f76ca to da6cac4 Compare December 8, 2025 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build error when using certain method names

2 participants