From 20e575bdc2e1bc994ba8550a0bdc395d2a56aadc Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Sun, 11 Aug 2013 20:07:58 +0000 Subject: [PATCH] Fixed a bug, updated the README --- README.md | 2 +- acvisitor.d | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8b19893..7170cd0 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ back to the client. * Autocompletion of __traits, scope, and extern arguments * Autocompletion of enums * Autocompletion of class, struct, and interface instances. - * Display of call tips (but only for the first overload) + * Display of call tips for functions and constructors * Not working: * Automatic starting of the server by the client * Windows support (I don't know that it won't work, but this program is not tested on Windows yet) diff --git a/acvisitor.d b/acvisitor.d index 045a627..0724a90 100644 --- a/acvisitor.d +++ b/acvisitor.d @@ -31,6 +31,7 @@ import std.conv; import actypes; import messages; import modulecache; +import autocomplete; class AutocompleteVisitor : ASTVisitor { @@ -112,7 +113,7 @@ class AutocompleteVisitor : ASTVisitor s.name = member.name.value; s.location = member.name.startIndex; if (type is null) - s.resolvedType = scope_.findSymbolInScope("int"); + s.resolvedType = scope_.findSymbolsInScope("int")[0]; else s.type = type; if (parentSymbol !is null) @@ -299,6 +300,7 @@ class AutocompleteVisitor : ASTVisitor override void visit(Module mod) { scope_ = new Scope(0, size_t.max); + scope_.symbols ~= builtinSymbols; mod.accept(this); }