зеркало из https://github.com/mono/mail-archives.git
109 строки
3.7 KiB
HTML
109 строки
3.7 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Mono-bugs] [Bug 23932] New - integer literals for "small" integer types (byte)
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:bugzilla-daemon%40rocky.ximian.com">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
|
|
<LINK REL="Previous" HREF="000466.html">
|
|
<LINK REL="Next" HREF="000468.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Mono-bugs] [Bug 23932] New - integer literals for "small" integer types (byte)
|
|
</H1>
|
|
<B>bugzilla-daemon@rocky.ximian.com
|
|
</B>
|
|
<A HREF="mailto:bugzilla-daemon%40rocky.ximian.com"
|
|
TITLE="[Mono-bugs] [Bug 23932] New - integer literals for "small" integer types (byte)">bugzilla-daemon@rocky.ximian.com
|
|
</A><BR>
|
|
<I>26 Apr 2002 21:23:15 -0000</I>
|
|
<P><UL>
|
|
<LI> Previous message: <A HREF="000466.html">[Mono-bugs] [Bug 23644] Changed - mcs is getting the incorrect overloaded method
|
|
</A></li>
|
|
<LI> Next message: <A HREF="000468.html">[Mono-bugs] [Bug 23914] Changed - mcs uses wrong method flags on Finalize
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#467">[ date ]</a>
|
|
<a href="thread.html#467">[ thread ]</a>
|
|
<a href="subject.html#467">[ subject ]</a>
|
|
<a href="author.html#467">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>Please do not reply to this email- if you want to comment on the bug, go to the
|
|
URL shown below and enter your comments there.
|
|
|
|
Changed by <A HREF="mailto:martin@gnome.org.">martin@gnome.org.</A>
|
|
|
|
<A HREF="http://bugzilla.ximian.com/show_bug.cgi?id=23932">http://bugzilla.ximian.com/show_bug.cgi?id=23932</A>
|
|
|
|
--- shadow/23932 Fri Apr 26 17:23:15 2002
|
|
+++ shadow/23932.tmp.11006 Fri Apr 26 17:23:15 2002
|
|
@@ -0,0 +1,44 @@
|
|
+Bug#: 23932
|
|
+Product: Mono/MCS
|
|
+Version: unspecified
|
|
+OS: All
|
|
+OS Details:
|
|
+Status: NEW
|
|
+Resolution:
|
|
+Severity:
|
|
+Priority: Normal
|
|
+Component: Misc
|
|
+AssignedTo: <A HREF="mailto:mono-bugs@ximian.com">mono-bugs@ximian.com</A>
|
|
+ReportedBy: <A HREF="mailto:martin@gnome.org">martin@gnome.org</A>
|
|
+QAContact: <A HREF="mailto:mono-bugs@ximian.com">mono-bugs@ximian.com</A>
|
|
+TargetMilestone: ---
|
|
+URL:
|
|
+Cc:
|
|
+Summary: integer literals for "small" integer types (byte)
|
|
+
|
|
+MCS doesn't handle integer literals correctly.
|
|
+
|
|
+Const.LookupConstantValue() always gets an IntLiteral/UIntLiteral
|
|
+expression instead of a ByteLiteral etc. one.
|
|
+
|
|
+To reproduce, try
|
|
+
|
|
+ private const Byte MyByte1 = 42;
|
|
+
|
|
+I've added some debugging output to const.c around line 150:
|
|
+
|
|
+ Console.WriteLine ("CONSTANT: " + Location + " " +
|
|
+FieldBuilder.FieldType + " " + Expr + " " + ConstantValue + " " +
|
|
+ConstantValue.GetType ());
|
|
+
|
|
+ FieldBuilder.SetConstant (ConstantValue);
|
|
+
|
|
+this prints
|
|
+
|
|
+CONSTANT: c:\TEMP\martin\mcs\class\corlib\Test\System\ByteTest.cs: (17)
|
|
+System.Byte IntLiteral (42) 42 System.Int32
|
|
+
|
|
+and raises an exception since you can't assign a System.Int32 to a
|
|
+System.Byte constant.
|
|
+
|
|
+Martin
|
|
|
|
|
|
</PRE>
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI> Previous message: <A HREF="000466.html">[Mono-bugs] [Bug 23644] Changed - mcs is getting the incorrect overloaded method
|
|
</A></li>
|
|
<LI> Next message: <A HREF="000468.html">[Mono-bugs] [Bug 23914] Changed - mcs uses wrong method flags on Finalize
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#467">[ date ]</a>
|
|
<a href="thread.html#467">[ thread ]</a>
|
|
<a href="subject.html#467">[ subject ]</a>
|
|
<a href="author.html#467">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
</body></html>
|