Brian Schott
Brian Schott
Example of code that DMD silently accepts with warnings enabled: ``` d class Super { int x; } class Sub : Super { int x; } ```
Code like `if (x = 3) {` is probably not intentional.
Issue a warning for redundant checks in if statements, for example: ``` d if (beforeTokens.length >= 2) { if (beforeTokens.length >= 2 && some_condition) ```
1. Create a multi-line string literal where one of the lines is longer than 120 characters 2. The warning message will contain the line number of the beginning of the...
Calling destroy() on a ponter to a struct doesn't run the destructor, so this is probably a mistake.
This is usually not intended.
Test case: ```d SomeStruct s; with(s) { a = alpha(); } ```
For example: `dfmt
This will cause the parsing functions to correctly return null when a token is missing. Fixes #392 and other similar issues that have not yet been discovered.