[vala/staging] vala: Skip UsingDirective if error is set



commit e5907252d4166adcc50969c1cc3aa6493760504e
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Thu Feb 20 15:34:35 2020 +0100

    vala: Skip UsingDirective if error is set

 vala/valamemberaccess.vala | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/vala/valamemberaccess.vala b/vala/valamemberaccess.vala
index 8b199b930..a0dc84d62 100644
--- a/vala/valamemberaccess.vala
+++ b/vala/valamemberaccess.vala
@@ -307,6 +307,10 @@ public class Vala.MemberAccess : Expression {
 
                        if (symbol_reference == null && source_reference != null) {
                                foreach (UsingDirective ns in source_reference.using_directives) {
+                                       if (ns.error) {
+                                               // ignore previous error
+                                               continue;
+                                       }
                                        var local_sym = ns.namespace_symbol.scope.lookup (member_name);
                                        if (local_sym != null) {
                                                if (symbol_reference != null && symbol_reference != 
local_sym) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]