Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CS0119 thrown when benchmark named _.System() #2543

Open
mflibby opened this issue Mar 15, 2024 · 0 comments
Open

CS0119 thrown when benchmark named _.System() #2543

mflibby opened this issue Mar 15, 2024 · 0 comments

Comments

@mflibby
Copy link

mflibby commented Mar 15, 2024

This is a problem that I have resolved, but I want to make this info available in case others run into a similar problem.
Consider the following extract from the benchmarking I have written:

type InsertBenchmark() =
    [<ParamsSource(nameof(InsertBenchmark.DataValues))>]
    member public _.Data 
        ...
    ...
    [<Benchmark(Baseline = true)>]
    member _.System() = 
        ...

(see Form>Performance for a full example)

About a month ago, this benchmark ran fine. I ran it again this week without any substantive changes and it threw CS0119 (the library I'm benchmarking is undergoing a major revision change, so the code in the respective benchmarks changed, but the "System" benchmark did not change at all, as it tests the tools available in the System libraries).

Error Details:

 error CS0119: 'InsertBenchmark.System()' is a method, which is not valid in the given context

Changing from System to anything else eliminated the error, so I don't think this warrants a change/addition to the library, but if there is a way to catch benchmarks that are named System and warn the user (or whatever else if there is a different root cause I am not seeing here).

Potentially related issues/PRs: #832, #754

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

No branches or pull requests

1 participant