[vala] Fix use of generics in async methods in generic types



commit 5ea2c988ae50871146ac6b863a43656b8f48375e
Author: Jürg Billeter <j bitron ch>
Date:   Thu Sep 24 19:23:21 2009 +0200

    Fix use of generics in async methods in generic types
    
    Fixes bug 596177.

 codegen/valaccodebasemodule.vala |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 0b15c61..25cdbe3 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -2167,7 +2167,7 @@ internal class Vala.CCodeBaseModule : CCodeModule {
 		if (type is GenericType) {
 			string var_name = "%s_type".printf (type.type_parameter.name.down ());
 			if (is_in_generic_type (type) && !is_chainup && !in_creation_method) {
-				return new CCodeMemberAccess.pointer (new CCodeMemberAccess.pointer (new CCodeIdentifier ("self"), "priv"), var_name);
+				return new CCodeMemberAccess.pointer (new CCodeMemberAccess.pointer (get_result_cexpression ("self"), "priv"), var_name);
 			} else {
 				return new CCodeIdentifier (var_name);
 			}
@@ -2217,7 +2217,7 @@ internal class Vala.CCodeBaseModule : CCodeModule {
 		} else if (type.type_parameter != null) {
 			string func_name = "%s_dup_func".printf (type.type_parameter.name.down ());
 			if (is_in_generic_type (type) && !is_chainup && !in_creation_method) {
-				return new CCodeMemberAccess.pointer (new CCodeMemberAccess.pointer (new CCodeIdentifier ("self"), "priv"), func_name);
+				return new CCodeMemberAccess.pointer (new CCodeMemberAccess.pointer (get_result_cexpression ("self"), "priv"), func_name);
 			} else {
 				return new CCodeIdentifier (func_name);
 			}
@@ -2391,7 +2391,7 @@ internal class Vala.CCodeBaseModule : CCodeModule {
 		} else if (type.type_parameter != null && current_type_symbol is Class) {
 			string func_name = "%s_destroy_func".printf (type.type_parameter.name.down ());
 			if (is_in_generic_type (type) && !is_chainup && !in_creation_method) {
-				return new CCodeMemberAccess.pointer (new CCodeMemberAccess.pointer (new CCodeIdentifier ("self"), "priv"), func_name);
+				return new CCodeMemberAccess.pointer (new CCodeMemberAccess.pointer (get_result_cexpression ("self"), "priv"), func_name);
 			} else {
 				return new CCodeIdentifier (func_name);
 			}



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