[Mono-dev] [Mono-patches] r52427 - trunk/mcs/mbas
monoman at gmail.com
Tue Nov 1 08:55:08 EST 2005
Well this is what vbc generates either way:
.locals init (
valuetype ExpressionLiteralsNothing/MyStruct V_0)
IL_0002: brtrue.s IL_0014
IL_0005: ldtoken ExpressionLiteralsNothing/MyStruct
IL_000a: call class [mscorlib]System.Type class
IL_000f: call object class
IL_0014: unbox ExpressionLiteralsNothing/MyStruct
IL_0019: ldobj ExpressionLiteralsNothing/MyStruct
So the struct is "synthesized" from a null (very non-c#) either way
(regarding Option Strict). :)
On 11/1/05, Rafael Teixeira <monoman at gmail.com> wrote:
> Hi Miguel,
> The team is already working on it, but there is a test written by
> Ritvik (ExpressionLiteralNothingB.vb) that shows this behaviour is
> consistent with what vbc does.
> I've told Maverson just to explore further to make sure if this
> behaviour is affected by Option Strict On (the default, as in the test
> source where the directive is omitted, is Off).
> On 10/31/05, Miguel de Icaza <miguel at novell.com> wrote:
> > Hello,
> > The code in that revision for UnboxCast looks suspiciously wrong.
> > It creates an empty object if child expression leaves a null on the
> > stack.
> > Also, it would be convenient if you added a test case that showed
> > this problem.
> > --
> > Miguel de Icaza <miguel at novell.com>
> > Novell, Inc.
> > _______________________________________________
> > Mono-devel-list mailing list
> > Mono-devel-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
> Rafael "Monoman" Teixeira
> I'm trying to become a "Rosh Gadol" before my own eyes.
> See http://www.joelonsoftware.com/items/2004/12/06.html for enlightment.
> It hurts!
Rafael "Monoman" Teixeira
I'm trying to become a "Rosh Gadol" before my own eyes.
See http://www.joelonsoftware.com/items/2004/12/06.html for enlightment.
More information about the Mono-devel-list