Skip to content

Commit 9abcf49

Browse files
authored
Merge pull request #888 from zyedidia/fix-885
Fixes #885
2 parents cd6dae9 + 3437e30 commit 9abcf49

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/dscanner/analysis/mismatched_args.d

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ const(DSymbol)*[] resolveSymbol(const Scope* sc, const istring[] symbolChain)
161161
{
162162
if (symbol.kind == CompletionKind.variableName
163163
|| symbol.kind == CompletionKind.memberVariableName
164-
|| symbol.kind == CompletionKind.functionName)
164+
|| symbol.kind == CompletionKind.functionName
165+
|| symbol.kind == CompletionKind.aliasName)
165166
symbol = symbol.type;
166167
if (symbol is null)
167168
{

src/dscanner/analysis/unused_result.d

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,21 @@ unittest
132132
}
133133
}c.format(UnusedResultChecker.MSG), sac);
134134

135+
assertAnalyzerWarnings(q{
136+
struct Foo
137+
{
138+
static bool get()
139+
{
140+
return false;
141+
}
142+
}
143+
alias Bar = Foo;
144+
void main()
145+
{
146+
Bar.get(); // [warn]: %s
147+
}
148+
}c.format(UnusedResultChecker.MSG), sac);
149+
135150
assertAnalyzerWarnings(q{
136151
void main()
137152
{

0 commit comments

Comments
 (0)