+2006-10-09 Martin Baulig <martin@ximian.com>
+
+ * delegate.cs
+ (Delegate.DefineType): Don't call TypeParameter.Resolve() here;
+ moved that into Define() and also do the other type parameter
+ checks there. Fixes #79094. Added gtest-292.cs.
+
+ * expression.cs
+ (ArrayCreation.EmitDynamicInitializers): Use `etype.IsValueType'
+ since that doesn't include type parameters; don't use `Ldelema'
+ for type parameters. Fixes #78980. Added gtest-293.cs.
+
2006-10-08 Marek Safar <marek.safar@seznam.cz>
A fix for #77796
if (TypeBuilder != null)
return TypeBuilder;
-#if GMCS_SOURCE
- if (IsGeneric) {
- foreach (TypeParameter type_param in TypeParameters)
- if (!type_param.Resolve (this))
- return null;
- }
-#endif
-
if (TypeManager.multicast_delegate_type == null && !RootContext.StdLib) {
Namespace system = RootNamespace.Global.GetNamespace ("System", true);
TypeExpr expr = system.Lookup (this, "MulticastDelegate", Location) as TypeExpr;
{
#if GMCS_SOURCE
if (IsGeneric) {
- foreach (TypeParameter type_param in TypeParameters)
- type_param.DefineType (this);
+ foreach (TypeParameter type_param in TypeParameters) {
+ if (!type_param.Resolve (this))
+ return false;
+ }
+
+ foreach (TypeParameter type_param in TypeParameters) {
+ if (!type_param.DefineType (this))
+ return false;
+ }
+
+ foreach (TypeParameter type_param in TypeParameters) {
+ if (!type_param.CheckDependencies ())
+ return false;
+ }
}
#endif
// If we are dealing with a struct, get the
// address of it, so we can store it.
//
- if ((dims == 1) &&
- TypeManager.IsValueType (etype) &&
- (!TypeManager.IsBuiltinOrEnum (etype) ||
- etype == TypeManager.decimal_type)) {
+ if ((dims == 1) && etype.IsValueType &&
+ (!TypeManager.IsBuiltinOrEnum (etype) ||
+ etype == TypeManager.decimal_type)) {
if (e is New){
New n = (New) e;