From: Rico Tzschichholz Date: Fri, 8 Dec 2017 23:25:16 +0000 (+0100) Subject: SemanticAnalyzer.get_data_type_for_symbol() doesn't require a TypeSymbol X-Git-Tag: 0.39.2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c917b96fbcda57d3403979d8e001aedb029a8ec7;p=thirdparty%2Fvala.git SemanticAnalyzer.get_data_type_for_symbol() doesn't require a TypeSymbol --- diff --git a/vala/valamemberaccess.vala b/vala/valamemberaccess.vala index 30143532e..93652026c 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 bc6b18efc..0968600dd 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 122f411a3..a7bbb18e6 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 type_parameters = null;