Initial import of the Generic MCS tree.
[mono.git] / mcs / gmcs / ecore.cs
index 60f583b959fb9834cb649f5db4afd289292da0e6..0dc221c0c95bdab4c70c8d8044eb121b15cbdbf3 100755 (executable)
@@ -1989,6 +1989,13 @@ namespace Mono.CSharp {
                                // we have alias value, but it isn't Type, so try if it's namespace
                                return new SimpleName (alias_value, loc);
                        }
+
+                       if (ec.IsGeneric){
+                               TypeParameterExpr generic_type = ds.LookupGeneric (Name, loc);
+                               
+                               if (generic_type != null)
+                                       return generic_type;
+                       }
                        
                        //
                        // Stage 2: Lookup up if we are an alias to a type
@@ -2097,7 +2104,7 @@ namespace Mono.CSharp {
 
                                lookup_ds =lookup_ds.Parent;
                        } while (lookup_ds != null);
-                               
+
                        if (e == null && ec.ContainerType != null)
                                e = MemberLookup (ec, ec.ContainerType, Name, loc);