]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Report error on invalid using directives
authorAaron Andersen <aaron@fosslib.net>
Fri, 20 Aug 2010 16:02:14 +0000 (18:02 +0200)
committerJürg Billeter <j@bitron.ch>
Fri, 17 Sep 2010 23:00:13 +0000 (01:00 +0200)
Fixes bug 626103.

vala/valasymbolresolver.vala

index 6483541de50f595f4c5d9ec09e89f9e2bd055ef7..026d6ea265f2d60a38e0935195651fcc4bde1a59 100644 (file)
@@ -215,7 +215,7 @@ public class Vala.SymbolResolver : CodeVisitor {
                var unresolved_symbol = ns.namespace_symbol as UnresolvedSymbol;
                if (unresolved_symbol != null) {
                        ns.namespace_symbol = resolve_symbol (unresolved_symbol);
-                       if (ns.namespace_symbol == null) {
+                       if (!(ns.namespace_symbol is Namespace)) {
                                ns.error = true;
                                Report.error (ns.source_reference, "The namespace name `%s' could not be found".printf (unresolved_symbol.to_string ()));
                                return;