D-Scanner icon indicating copy to clipboard operation
D-Scanner copied to clipboard

Static `@property` function wrongly marked as needing `const`, `inout`, or `immutable`

Open brianush1 opened this issue 6 years ago • 1 comments

private class Foo {
	static int bar() @property {
		return 2;
	}
}

D-scanner suggests putting a const, inout, or immutable attribute on bar; however, doing this would result in a compilation error.

brianush1 avatar Feb 09 '20 12:02 brianush1

I think it's worth mentioning this issue also applies to global functions, such as:

int bar() @property {
	return 2;
}

brianush1 avatar Apr 04 '20 21:04 brianush1