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



commit ff20c6afaed7c0aed803eada516cc528eefc848f
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 6cc837749..695e05696 100644
--- a/vala/valamemberaccess.vala
+++ b/vala/valamemberaccess.vala
@@ -300,6 +300,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]