[valadoc] 0.20.x: Fix TypeParameter.base



commit 8ec73ad2cf0749f5e503787c63f160f3cea2964c
Author: Florian Brosch <flo brosch gmail com>
Date:   Thu Feb 7 00:26:12 2013 +0100

    0.20.x: Fix TypeParameter.base

 src/driver/0.20.x/symbolresolver.vala |    2 ++
 src/driver/0.20.x/treebuilder.vala    |    5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/driver/0.20.x/symbolresolver.vala b/src/driver/0.20.x/symbolresolver.vala
index f548f73..4adc06b 100644
--- a/src/driver/0.20.x/symbolresolver.vala
+++ b/src/driver/0.20.x/symbolresolver.vala
@@ -83,6 +83,8 @@ public class Valadoc.Drivers.SymbolResolver : Visitor {
                        }
                } else if (vtyperef is Vala.DelegateType) {
                        reference.data_type = resolve (((Vala.DelegateType) vtyperef).delegate_symbol);
+               } else if (vtyperef is Vala.GenericType) {
+                       reference.data_type = resolve (((Vala.GenericType) vtyperef).type_parameter);
                } else if (vtyperef.data_type != null) {
                        reference.data_type = resolve (vtyperef.data_type);
                }
diff --git a/src/driver/0.20.x/treebuilder.vala b/src/driver/0.20.x/treebuilder.vala
index cc135d4..343527a 100644
--- a/src/driver/0.20.x/treebuilder.vala
+++ b/src/driver/0.20.x/treebuilder.vala
@@ -170,8 +170,8 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
                        type_ref.data_type = create_pointer ((Vala.PointerType) vtyperef,  type_ref, caller);
                } else if (vtyperef is Vala.ArrayType) {
                        type_ref.data_type = create_array ((Vala.ArrayType) vtyperef,  type_ref, caller);
-               } else if (vtyperef is Vala.GenericType) {
-                       type_ref.data_type = new TypeParameter (caller, caller.get_source_file (), 
((Vala.GenericType) vtyperef).type_parameter.name, vtyperef);
+               //} else if (vtyperef is Vala.GenericType) {
+               //      type_ref.data_type = new TypeParameter (caller, caller.get_source_file (), 
((Vala.GenericType) vtyperef).type_parameter.name, vtyperef);
                }
 
                // type parameters:
@@ -1206,6 +1206,7 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
                SourceFile? file = get_source_file (element);
 
                Symbol node = new TypeParameter (parent, file, element.name, element);
+               symbol_map.set (element, node);
                parent.add_child (node);
 
                process_children (node, element);


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