[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: cscctest/csharp/class interface6.cs,NONE,1.1
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: cscctest/csharp/class interface6.cs,NONE,1.1 interface6.il,NONE,1.1 interface6.jl,NONE,1.1 Makefile.am,1.33,1.34 |
Date: |
Wed, 26 Feb 2003 20:02:22 -0500 |
Update of /cvsroot/dotgnu-pnet/cscctest/csharp/class
In directory subversions:/tmp/cvs-serv15248/csharp/class
Modified Files:
Makefile.am
Added Files:
interface6.cs interface6.il interface6.jl
Log Message:
Add a test case for multiple inclusions of the same interface.
--- NEW FILE ---
/*
* interface6.cs - Test multi-inclusions of interfaces.
*
* Copyright (C) 2002 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;
public interface A
{
int t1 { get; }
}
public interface B : A
{
}
public interface C : B, A
{
}
public class Test
{
int t2(C x)
{
// t1 is included via multiple paths, but this should not
// result in an "ambiguous" error.
return x.t1;
}
}
--- NEW FILE ---
.assembly extern '.library'
{
.ver 0:0:0:0
}
.assembly '<Assembly>'
{
.ver 0:0:0:0
}
.module '<Module>'
.class public auto interface abstract ansi 'A'
{
.method public virtual hidebysig newslot abstract specialname instance int32
'get_t1'() cil managed
{
} // method get_t1
.property instance int32 't1'()
{
.get instance int32 'A'::'get_t1'()
} // property t1
} // class A
.class public auto interface abstract ansi 'B' implements 'A'
{
} // class B
.class public auto interface abstract ansi 'C' implements 'A', 'B'
{
} // class C
.class public auto ansi 'Test' extends ['.library']'System'.'Object'
{
.method private hidebysig instance int32 't2'(class 'C' 'x') cil managed
{
ldarg.1
callvirt instance int32 'A'::'get_t1'()
ret
.maxstack 1
} // method t2
.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>'
.class public auto interface abstract ansi 'A'
{
.method public virtual hidebysig newslot abstract specialname instance int32
'get_t1'() cil managed java
{
} // method get_t1
.property instance int32 't1'()
{
.get instance int32 'A'::'get_t1'()
} // property t1
} // class A
.class public auto interface abstract ansi 'B' implements 'A'
{
} // class B
.class public auto interface abstract ansi 'C' implements 'A', 'B'
{
} // class C
.class public auto ansi 'Test' extends ['.library']'System'.'Object'
{
.method private hidebysig instance int32 't2'(class 'C' 'x') cil managed java
{
aload_1
invokeinterface instance int32 'A'::'get_t1'() 1
ireturn
.locals 2
.maxstack 1
} // method t2
.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
Index: Makefile.am
===================================================================
RCS file: /cvsroot/dotgnu-pnet/cscctest/csharp/class/Makefile.am,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** Makefile.am 26 Feb 2003 23:04:54 -0000 1.33
--- Makefile.am 27 Feb 2003 01:02:19 -0000 1.34
***************
*** 26,29 ****
--- 26,30 ----
interface4.cs \
interface5.cs \
+ interface6.cs \
method1.cs \
method2.cs \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: cscctest/csharp/class interface6.cs,NONE,1.1 interface6.il,NONE,1.1 interface6.jl,NONE,1.1 Makefile.am,1.33,1.34,
Rhys Weatherley <address@hidden> <=