diff --git a/src/dscanner/analysis/mismatched_args.d b/src/dscanner/analysis/mismatched_args.d index a25ce0e..0507113 100644 --- a/src/dscanner/analysis/mismatched_args.d +++ b/src/dscanner/analysis/mismatched_args.d @@ -161,7 +161,8 @@ const(DSymbol)*[] resolveSymbol(const Scope* sc, const istring[] symbolChain) { if (symbol.kind == CompletionKind.variableName || symbol.kind == CompletionKind.memberVariableName - || symbol.kind == CompletionKind.functionName) + || symbol.kind == CompletionKind.functionName + || symbol.kind == CompletionKind.aliasName) symbol = symbol.type; if (symbol is null) { diff --git a/src/dscanner/analysis/unused_result.d b/src/dscanner/analysis/unused_result.d index 85f34a4..3977e15 100644 --- a/src/dscanner/analysis/unused_result.d +++ b/src/dscanner/analysis/unused_result.d @@ -132,6 +132,21 @@ unittest } }c.format(UnusedResultChecker.MSG), sac); + assertAnalyzerWarnings(q{ + struct Foo + { + static bool get() + { + return false; + } + } + alias Bar = Foo; + void main() + { + Bar.get(); // [warn]: %s + } + }c.format(UnusedResultChecker.MSG), sac); + assertAnalyzerWarnings(q{ void main() {