mirror of
https://github.com/dlang-community/D-Scanner.git
synced 2025-04-26 05:10:03 +03:00
fix auto_function autofix for auto ref fn()
This commit is contained in:
parent
f22b2e587c
commit
c8262f4220
1 changed files with 4 additions and 1 deletions
|
@ -82,7 +82,8 @@ public:
|
|||
}
|
||||
else
|
||||
addErrorMessage(autoTokens, KEY, MESSAGE,
|
||||
[AutoFix.replacement(autoTokens[0], "void")]);
|
||||
[AutoFix.replacement(autoTokens[0], "", "Replace `auto` with `void`")
|
||||
.concat(AutoFix.insertionAt(decl.name.index, "void "))]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -277,12 +278,14 @@ unittest
|
|||
|
||||
|
||||
assertAutoFix(q{
|
||||
auto ref doStuff(){} // fix
|
||||
auto doStuff(){} // fix
|
||||
@property doStuff(){} // fix
|
||||
@safe doStuff(){} // fix
|
||||
@Custom
|
||||
auto doStuff(){} // fix
|
||||
}c, q{
|
||||
ref void doStuff(){} // fix
|
||||
void doStuff(){} // fix
|
||||
@property void doStuff(){} // fix
|
||||
@safe void doStuff(){} // fix
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue