mail-archives/mono-bugs/2009-November/094948.html

212 строки
6.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mono-bugs] [Bug 555170] New: can't compile method using optional parameter whose type is defined in another file.
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%20555170%5D%20New%3A%20can%27t%20compile%20method%20using%20optional%0A%20parameter%20whose%20type%20is%20defined%20in%20another%20file.&In-Reply-To=">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="094947.html">
<LINK REL="Next" HREF="094952.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mono-bugs] [Bug 555170] New: can't compile method using optional parameter whose type is defined in another file.</H1>
<B>bugzilla_noreply at novell.com</B>
<A HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%20555170%5D%20New%3A%20can%27t%20compile%20method%20using%20optional%0A%20parameter%20whose%20type%20is%20defined%20in%20another%20file.&In-Reply-To="
TITLE="[Mono-bugs] [Bug 555170] New: can't compile method using optional parameter whose type is defined in another file.">bugzilla_noreply at novell.com
</A><BR>
<I>Fri Nov 13 02:10:10 EST 2009</I>
<P><UL>
<LI>Previous message: <A HREF="094947.html">[Mono-bugs] [Bug 522894] Mono based applications crash on XEN guests with kernel 2.6.24-19-xen thru 2.6.24-23-xen
</A></li>
<LI>Next message: <A HREF="094952.html">[Mono-bugs] [Bug 555170] can't compile method using optional parameter whose type is defined in another file.
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#94948">[ date ]</a>
<a href="thread.html#94948">[ thread ]</a>
<a href="subject.html#94948">[ subject ]</a>
<a href="author.html#94948">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE><A HREF="http://bugzilla.novell.com/show_bug.cgi?id=555170">http://bugzilla.novell.com/show_bug.cgi?id=555170</A>
Summary: can't compile method using optional parameter whose
type is defined in another file.
Classification: Mono
Product: Mono: Compilers
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">mono-bugs at lists.ximian.com</A>
ReportedBy: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">vargaz at gmail.com</A>
QAContact: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">mono-bugs at lists.ximian.com</A>
Found By: ---
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4)
Gecko/20091028 Iceweasel/3.5.4 (Debian-3.5.4-1)
Testcase:
&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; bug.cs &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.Diagnostics;
using System.Linq.Expressions;
public class Tests
{
public static void foo (Foo f = Foo.None) {
}
public static void Main (String[] args) {
}
}
&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; foo.cs &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
public enum Foo {
None = 0
}
&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;
Compile:
gmcs bug.cs foo.cs
Result:
Unhandled Exception: Mono.CSharp.InternalErrorException: bug.cs(9,14): Tests
---&gt; Mono.CSharp.InternalErrorException: bug.cs(11,28): Tests.foo(Foo) ---&gt;
System.NullReferenceException: Object reference not set to an instance of an
object
at Mono.CSharp.EnumMember.Define () [0x00000] in &lt;filename unknown&gt;:0
at Mono.CSharp.TypeContainer.FindMembers (MemberTypes mt, BindingFlags bf,
System.Reflection.MemberFilter filter, System.Object criteria) [0x00000] in
&lt;filename unknown&gt;:0
at Mono.CSharp.TypeManager.MemberLookup_FindMembers (System.Type t,
MemberTypes mt, BindingFlags bf, System.String name, System.Boolean&amp;
used_cache) [0x00000] in &lt;filename unknown&gt;:0
at Mono.CSharp.TypeManager.RealMemberLookup (System.Type invocation_type,
System.Type qualifier_type, System.Type queried_type, MemberTypes mt,
BindingFlags original_bf, System.String name, IList almost_match) [0x00000] in
&lt;filename unknown&gt;:0
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
--
Configure bugmail: <A HREF="http://bugzilla.novell.com/userprefs.cgi?tab=email">http://bugzilla.novell.com/userprefs.cgi?tab=email</A>
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="094947.html">[Mono-bugs] [Bug 522894] Mono based applications crash on XEN guests with kernel 2.6.24-19-xen thru 2.6.24-23-xen
</A></li>
<LI>Next message: <A HREF="094952.html">[Mono-bugs] [Bug 555170] can't compile method using optional parameter whose type is defined in another file.
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#94948">[ date ]</a>
<a href="thread.html#94948">[ thread ]</a>
<a href="subject.html#94948">[ subject ]</a>
<a href="author.html#94948">[ 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>