dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: cscctest/csharp/class enum6.cs,NONE,1.1 enum


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: cscctest/csharp/class enum6.cs,NONE,1.1 enum6.il,NONE,1.1 enum6.jl,NONE,1.1 Makefile.am,1.32,1.33
Date: Wed, 26 Feb 2003 18:04:57 -0500

Update of /cvsroot/dotgnu-pnet/cscctest/csharp/class
In directory subversions:/tmp/cvs-serv8150/csharp/class

Modified Files:
        Makefile.am 
Added Files:
        enum6.cs enum6.il enum6.jl 
Log Message:


Test cases for enum/property ambiguities.


--- NEW FILE ---
/*
 * enum6.cs - Test enum/property ambiguities.
 *
 * Copyright (C) 2003  Free Software Foundation, Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

using System;

namespace ns1
{
    internal enum Foo
    {
        X,
        Y
    }
    public class FooBar
    {
        public static void WriteLine(Object o)
                {
                }
        public static void Main()
        {
            WriteLine(Foo.X);
        }
        internal Foo Foo
        {
            get
            {
                return Foo.Y;
            }
        }
    }
}

--- NEW FILE ---
.assembly extern '.library'
{
        .ver 0:0:0:0
}
.assembly '<Assembly>'
{
        .ver 0:0:0:0
}
.module '<Module>'
.namespace 'ns1'
{
.class private auto sealed serializable ansi 'Foo' extends 
['.library']'System'.'Enum'
{
.field public static literal valuetype 'ns1'.'Foo' 'X' = int32(0x00000000)
.field public static literal valuetype 'ns1'.'Foo' 'Y' = int32(0x00000001)
.field public specialname rtspecialname int32 'value__'
} // class Foo
} // namespace ns1
.namespace 'ns1'
{
.class public auto ansi 'FooBar' extends ['.library']'System'.'Object'
{
.method public static hidebysig void 'WriteLine'(class 
['.library']'System'.'Object' 'o') cil managed 
{
        ret
        .maxstack 0
} // method WriteLine
.method public static hidebysig void 'Main'() cil managed 
{
        ldc.i4.0
        box     'ns1'.'Foo'
        call    void 'ns1'.'FooBar'::'WriteLine'(class 
['.library']'System'.'Object')
        ret
        .maxstack 1
} // method Main
.method assembly hidebysig specialname instance valuetype 'ns1'.'Foo' 
'get_Foo'() cil managed 
{
        ldc.i4.1
        ret
        .maxstack 1
} // method get_Foo
.property instance valuetype 'ns1'.'Foo' 'Foo'()
{
        .get instance valuetype 'ns1'.'Foo' 'ns1'.'FooBar'::'get_Foo'()
} // property Foo
.method public hidebysig specialname rtspecialname instance void '.ctor'() cil 
managed 
{
        ldarg.0
        call    instance void ['.library']'System'.'Object'::'.ctor'()
        ret
        .maxstack 1
} // method .ctor
} // class FooBar
} // namespace ns1

--- NEW FILE ---
.assembly extern '.library'
{
        .ver 0:0:0:0
}
.assembly '<Assembly>'
{
        .ver 0:0:0:0
}
.module '<Module>'
.namespace 'ns1'
{
.class private auto sealed serializable ansi 'Foo' extends 
['.library']'System'.'Enum'
{
.field public static literal valuetype 'ns1'.'Foo' 'X' = int32(0x00000000)
.field public static literal valuetype 'ns1'.'Foo' 'Y' = int32(0x00000001)
.field public specialname rtspecialname int32 'value__'
} // class Foo
} // namespace ns1
.namespace 'ns1'
{
.class public auto ansi 'FooBar' extends ['.library']'System'.'Object'
{
.method public static hidebysig void 'WriteLine'(class 
['.library']'System'.'Object' 'o') cil managed java 
{
        return
        .locals 1
        .maxstack 0
} // method WriteLine
.method public static hidebysig void 'Main'() cil managed java 
{
        iconst_0
        invokestatic    "ns1/Foo" "copyIn__" "(I)Lns1/Foo;"
        invokestatic    void 'ns1'.'FooBar'::'WriteLine'(class 
['.library']'System'.'Object')
        return
        .locals 0
        .maxstack 1
} // method Main
.method assembly hidebysig specialname instance valuetype 'ns1'.'Foo' 
'get_Foo'() cil managed java 
{
        iconst_1
        ireturn
        .locals 1
        .maxstack 1
} // method get_Foo
.property instance valuetype 'ns1'.'Foo' 'Foo'()
{
        .get instance valuetype 'ns1'.'Foo' 'ns1'.'FooBar'::'get_Foo'()
} // property Foo
.method public hidebysig specialname rtspecialname instance void '.ctor'() cil 
managed java 
{
        aload_0
        invokespecial   instance void ['.library']'System'.'Object'::'.ctor'()
        return
        .locals 1
        .maxstack 1
} // method .ctor
} // class FooBar
} // namespace ns1

Index: Makefile.am
===================================================================
RCS file: /cvsroot/dotgnu-pnet/cscctest/csharp/class/Makefile.am,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -r1.32 -r1.33
*** Makefile.am 26 Feb 2003 02:20:47 -0000      1.32
--- Makefile.am 26 Feb 2003 23:04:54 -0000      1.33
***************
*** 13,16 ****
--- 13,17 ----
                enum4.cs \
                enum5.cs \
+               enum6.cs \
                event1.cs \
                field1.cs \





reply via email to

[Prev in Thread] Current Thread [Next in Thread]