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/expr cast8.cs,NONE,1.1 cast8


From: Gopal.V <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: cscctest/csharp/expr cast8.cs,NONE,1.1 cast8.il,NONE,1.1 cast8.jl,NONE,1.1
Date: Fri, 09 May 2003 11:29:31 -0400

Update of /cvsroot/dotgnu-pnet/cscctest/csharp/expr
In directory subversions:/tmp/cvs-serv2207/csharp/expr

Added Files:
        cast8.cs cast8.il cast8.jl 
Log Message:
Tests for type collisions for cast expressions


--- NEW FILE ---
/*
 * cast3.cs - Test the handling of name collisions for cast expressions
 *
 * Copyright (C) 2001  Southern Storm Software, Pty Ltd.
 *
 * 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 Foo
{
        public class Muncher
        {
        }
}

public class Test
{
        public void Bar(Object Foo)
        {
                Foo.Muncher f=(Foo.Muncher)Foo; 
        }
}

--- NEW FILE ---
.assembly extern '.library'
{
        .ver 0:0:0:0
}
.assembly '<Assembly>'
{
        .ver 0:0:0:0
}
.module '<Module>'
.namespace 'Foo'
{
.class public auto ansi 'Muncher' extends ['.library']'System'.'Object'
{
.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 Muncher
} // namespace Foo
.class public auto ansi 'Test' extends ['.library']'System'.'Object'
{
.method public hidebysig instance void 'Bar'(class 
['.library']'System'.'Object' 'Foo') cil managed 
{
        .locals init    (class 'Foo'.'Muncher')
        ldarg.1
        castclass       'Foo'.'Muncher'
        stloc.0
        ret
        .maxstack 1
} // method Bar
.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 Test

--- NEW FILE ---
.assembly extern '.library'
{
        .ver 0:0:0:0
}
.assembly '<Assembly>'
{
        .ver 0:0:0:0
}
.module '<Module>'
.namespace 'Foo'
{
.class public auto ansi 'Muncher' extends ['.library']'System'.'Object'
{
.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 Muncher
} // namespace Foo
.class public auto ansi 'Test' extends ['.library']'System'.'Object'
{
.method public hidebysig instance void 'Bar'(class 
['.library']'System'.'Object' 'Foo') cil managed java 
{
        aload_1
        checkcast       'Foo'.'Muncher'
        astore_2
        return
        .locals 3
        .maxstack 1
} // method Bar
.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 Test





reply via email to

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