[vala/staging: 3/12] SemanticAnalyzer.get_data_type_for_symbol() doesn't require a TypeSymbol



commit c917b96fbcda57d3403979d8e001aedb029a8ec7
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sat Dec 9 00:25:16 2017 +0100

    SemanticAnalyzer.get_data_type_for_symbol() doesn't require a TypeSymbol

 vala/valamemberaccess.vala     |    6 +++---
 vala/valaproperty.vala         |    2 +-
 vala/valasemanticanalyzer.vala |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/vala/valamemberaccess.vala b/vala/valamemberaccess.vala
index 3014353..9365202 100644
--- a/vala/valamemberaccess.vala
+++ b/vala/valamemberaccess.vala
@@ -839,18 +839,18 @@ public class Vala.MemberAccess : Expression {
                                        value_type.value_owned = target_type.value_owned;
                                }
                                if (instance && method.parent_symbol is TypeSymbol) {
-                                       inner.target_type = SemanticAnalyzer.get_data_type_for_symbol 
((TypeSymbol) method.parent_symbol);
+                                       inner.target_type = SemanticAnalyzer.get_data_type_for_symbol 
(method.parent_symbol);
                                        inner.target_type.value_owned = 
method.this_parameter.variable_type.value_owned;
                                }
                        } else if (symbol_reference is Property) {
                                var prop = (Property) symbol_reference;
                                if (instance && prop.parent_symbol != null) {
-                                       inner.target_type = SemanticAnalyzer.get_data_type_for_symbol 
((TypeSymbol) prop.parent_symbol);
+                                       inner.target_type = SemanticAnalyzer.get_data_type_for_symbol 
(prop.parent_symbol);
                                }
                        } else if ((symbol_reference is Field
                                    || symbol_reference is Signal)
                                   && instance && symbol_reference.parent_symbol != null) {
-                               var parent_type = SemanticAnalyzer.get_data_type_for_symbol ((TypeSymbol) 
symbol_reference.parent_symbol);
+                               var parent_type = SemanticAnalyzer.get_data_type_for_symbol 
(symbol_reference.parent_symbol);
                                inner.target_type = parent_type.get_actual_type (inner.value_type, null, 
this);
                        }
                }
diff --git a/vala/valaproperty.vala b/vala/valaproperty.vala
index bc6b18e..0968600 100644
--- a/vala/valaproperty.vala
+++ b/vala/valaproperty.vala
@@ -264,7 +264,7 @@ public class Vala.Property : Symbol, Lockable {
                        return false;
                }
 
-               var object_type = SemanticAnalyzer.get_data_type_for_symbol ((TypeSymbol) parent_symbol);
+               var object_type = SemanticAnalyzer.get_data_type_for_symbol (parent_symbol);
 
                if (get_accessor != null) {
                        // check accessor value_type instead of property_type
diff --git a/vala/valasemanticanalyzer.vala b/vala/valasemanticanalyzer.vala
index 122f411..a7bbb18 100644
--- a/vala/valasemanticanalyzer.vala
+++ b/vala/valasemanticanalyzer.vala
@@ -338,7 +338,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
                return null;
        }
 
-       public static DataType get_data_type_for_symbol (TypeSymbol sym) {
+       public static DataType get_data_type_for_symbol (Symbol sym) {
                DataType type = null;
 
                List<TypeParameter> type_parameters = null;


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