зеркало из https://github.com/mono/mail-archives.git
215 строки
5.2 KiB
HTML
215 строки
5.2 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Mono-bugs] [Bug 648391] New: TypeBuilder.GetConstructor does not check ctor argument
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%20648391%5D%20New%3A%20TypeBuilder.GetConstructor%20does%20not%0A%20check%20ctor%20argument&In-Reply-To=">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="105235.html">
|
|
<LINK REL="Next" HREF="105300.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Mono-bugs] [Bug 648391] New: TypeBuilder.GetConstructor does not check ctor argument</H1>
|
|
<B>bugzilla_noreply at novell.com</B>
|
|
<A HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%20648391%5D%20New%3A%20TypeBuilder.GetConstructor%20does%20not%0A%20check%20ctor%20argument&In-Reply-To="
|
|
TITLE="[Mono-bugs] [Bug 648391] New: TypeBuilder.GetConstructor does not check ctor argument">bugzilla_noreply at novell.com
|
|
</A><BR>
|
|
<I>Thu Oct 21 12:45:54 EDT 2010</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="105235.html">[Mono-bugs] [Bug 522624] SQL Data Adapter issues with NULL columns
|
|
</A></li>
|
|
<LI>Next message: <A HREF="105300.html">[Mono-bugs] [Bug 648391] TypeBuilder.GetConstructor does not check ctor argument
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#105241">[ date ]</a>
|
|
<a href="thread.html#105241">[ thread ]</a>
|
|
<a href="subject.html#105241">[ subject ]</a>
|
|
<a href="author.html#105241">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>
|
|
<A HREF="https://bugzilla.novell.com/show_bug.cgi?id=648391">https://bugzilla.novell.com/show_bug.cgi?id=648391</A>
|
|
|
|
<A HREF="https://bugzilla.novell.com/show_bug.cgi?id=648391#c0">https://bugzilla.novell.com/show_bug.cgi?id=648391#c0</A>
|
|
|
|
|
|
Summary: TypeBuilder.GetConstructor does not check ctor
|
|
argument
|
|
Classification: Mono
|
|
Product: Mono: Class Libraries
|
|
Version: SVN
|
|
Platform: Other
|
|
OS/Version: Other
|
|
Status: NEW
|
|
Severity: Normal
|
|
Priority: P5 - None
|
|
Component: CORLIB
|
|
AssignedTo: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">rkumpera at novell.com</A>
|
|
ReportedBy: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">msafar at novell.com</A>
|
|
QAContact: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">mono-bugs at lists.ximian.com</A>
|
|
Found By: ---
|
|
Blocker: ---
|
|
|
|
|
|
Compile & Run
|
|
|
|
using System;
|
|
using System.Reflection;
|
|
using System.Reflection.Emit;
|
|
|
|
class Program
|
|
{
|
|
static void Main ()
|
|
{
|
|
AssemblyName asmname = new AssemblyName ();
|
|
asmname.Name = "assemfilename.exe";
|
|
AssemblyBuilder asmbuild = System.Threading.Thread.GetDomain ().
|
|
DefineDynamicAssembly (asmname,
|
|
AssemblyBuilderAccess.RunAndSave);
|
|
ModuleBuilder modbuild = asmbuild.DefineDynamicModule ("modulename",
|
|
"assemfilename.exe");
|
|
|
|
TypeBuilder myType = modbuild.DefineType ("Sample",
|
|
TypeAttributes.Public);
|
|
|
|
string[] typeParamNames = { "TFirst" };
|
|
GenericTypeParameterBuilder[] typeParams =
|
|
myType.DefineGenericParameters (typeParamNames);
|
|
|
|
var ctor = myType.DefineDefaultConstructor (MethodAttributes.Public);
|
|
|
|
var ctori = TypeBuilder.GetConstructor (myType.MakeGenericType (typeof
|
|
(int)), ctor);
|
|
var ctorii = TypeBuilder.GetConstructor (myType.MakeGenericType (typeof
|
|
(bool)), ctori);
|
|
Console.WriteLine (ctorii);
|
|
|
|
return;
|
|
}
|
|
}
|
|
|
|
NET throws
|
|
|
|
System.ArgumentException: The specified constructor must be declared on a
|
|
generic type definition.
|
|
Parameter name: constructor
|
|
at System.Reflection.Emit.TypeBuilder.GetConstructor(Type type,
|
|
ConstructorIn
|
|
fo constructor)
|
|
at Program.Main()
|
|
|
|
Mono
|
|
<nothing>
|
|
|
|
I have not tested it but same issue may exist with TypeBuilder.GetMethod
|
|
|
|
--
|
|
Configure bugmail: <A HREF="https://bugzilla.novell.com/userprefs.cgi?tab=email">https://bugzilla.novell.com/userprefs.cgi?tab=email</A>
|
|
------- You are receiving this mail because: -------
|
|
You are the QA contact for the bug.
|
|
</PRE>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="105235.html">[Mono-bugs] [Bug 522624] SQL Data Adapter issues with NULL columns
|
|
</A></li>
|
|
<LI>Next message: <A HREF="105300.html">[Mono-bugs] [Bug 648391] TypeBuilder.GetConstructor does not check ctor argument
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#105241">[ date ]</a>
|
|
<a href="thread.html#105241">[ thread ]</a>
|
|
<a href="subject.html#105241">[ subject ]</a>
|
|
<a href="author.html#105241">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
|
|
<hr>
|
|
<a href="http://lists.ximian.com/mailman/listinfo/mono-bugs">More information about the mono-bugs
|
|
mailing list</a><br>
|
|
</body></html>
|