Inspectopedia
 
2024.3

Delegating to 'var' property

Warning
New
Last modified: 03 December 2024

Reports interface delegation to a var property.

Only initial value of a property is used for delegation, any later assignments do not affect it.

Example:

The quick-fix replaces a property with immutable one:

Alternative way, if you rely on mutability for some reason: