question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Records: Warn if a get-only property is unused

See original GitHub issue
public record A
{
    public string P1 { get; }
}

There should be a warning on P1 that it is never set.

See @jnm2’s comment (https://github.com/dotnet/roslyn/issues/47666#issuecomment-692054797)

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
jnm2commented, Sep 14, 2020

(IIRC strict mode is undocumented, but the new warning level 5 will include it entirely.)

0reactions
jinujosephcommented, Sep 28, 2020

Sure @Youssef1313 , looping in @jcouv from Compiler team

Read more comments on GitHub >

github_iconTop Results From Across the Web

getters should not be used for side effects" warning - ...
However, when I am trying to initialize accelerometer processes, I get the following warning: "Property access result unused - getters ...
Read more >
Coverage: Find unused JavaScript and CSS
Record if you want to see what code is used after interacting with the page. Click Stop Instrumenting Coverage And Show Results Stop...
Read more >
52.245-1 Government Property.
Property records means the records created and maintained by the contractor ... cost if desired or make reasonable efforts to return unused property...
Read more >
Property Fraud Alert | Sumter County Clerk of Courts
With Property Fraud Alert, subscribers will be notified when the name they have submitted is used in any recording activities within the Recorder's...
Read more >
required modifier - C# Reference
In this article. The required modifier indicates that the field or property it's applied to must be initialized by an object initializer.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found