зеркало из https://github.com/mono/mail-archives.git
83 строки
2.7 KiB
HTML
83 строки
2.7 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Mono-list] Strange compiler (mis)behaviour
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:Aleksandar%20Dezelin%20%3Cdezelin%40gmail.com%3E">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
|
|
<LINK REL="Previous" HREF="025945.html">
|
|
<LINK REL="Next" HREF="025950.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Mono-list] Strange compiler (mis)behaviour
|
|
</H1>
|
|
<B>Aleksandar Dezelin
|
|
</B>
|
|
<A HREF="mailto:Aleksandar%20Dezelin%20%3Cdezelin%40gmail.com%3E"
|
|
TITLE="[Mono-list] Strange compiler (mis)behaviour">Aleksandar Dezelin <dezelin@gmail.com>
|
|
</A><BR>
|
|
<I>Tue, 22 Feb 2005 16:48:35 +0100</I>
|
|
<P><UL>
|
|
<LI> Previous message: <A HREF="025945.html">[Mono-list] Problem with browser detection
|
|
</A></li>
|
|
<LI> Next message: <A HREF="025950.html">[Mono-list] Re: Strange compiler (mis)behaviour
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#25924">[ date ]</a>
|
|
<a href="thread.html#25924">[ thread ]</a>
|
|
<a href="subject.html#25924">[ subject ]</a>
|
|
<a href="author.html#25924">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>I get this error when I try to compile my application code:
|
|
|
|
*** Building TemplateConvertor.exe...
|
|
/usr/local/bin/mcs -g -d:DEBUG,TRACE -checked+ -L ./lib -t:exe
|
|
-out:./lib/TemplateConvertor.exe -r:System,System.Data,PassiveTypes
|
|
@TemplateConvertor.sources
|
|
./src/TemplateConvertor/AccessTemplates.cs(98) error CS0172: Can not
|
|
compute type of conditional expression as `int' and `short' convert
|
|
implicitly to each other
|
|
Compilation failed: 1 error(s), 0 warnings
|
|
|
|
|
|
This is the problematic piece of code:
|
|
|
|
template.CompressionLevel is of type short.
|
|
template.CompressionLevel = (reader.IsDBNull(1)) ? 0 : reader.GetInt16(1);
|
|
|
|
why mcs compiler does not generate code like in the case the second line is:
|
|
|
|
template.CompressionLevel = (reader.IsDBNull(1)) ? (short)0 :
|
|
reader.GetInt16(1);
|
|
|
|
Cheers,
|
|
Aleksandar Dezelin
|
|
|
|
|
|
|
|
--
|
|
Linux is like wighwam, no windows no gates and apache inside...
|
|
|
|
</PRE>
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI> Previous message: <A HREF="025945.html">[Mono-list] Problem with browser detection
|
|
</A></li>
|
|
<LI> Next message: <A HREF="025950.html">[Mono-list] Re: Strange compiler (mis)behaviour
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#25924">[ date ]</a>
|
|
<a href="thread.html#25924">[ thread ]</a>
|
|
<a href="subject.html#25924">[ subject ]</a>
|
|
<a href="author.html#25924">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
</body></html>
|