[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: cscctest/csharp/class abstract1.cs,NONE,1.1 a
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: cscctest/csharp/class abstract1.cs,NONE,1.1 abstract1.err,NONE,1.1 abstract1.jerr,NONE,1.1 Makefile.am,1.31,1.32 method9.err,1.1,1.2 method9.jerr,1.1,1.2 |
Date: |
Tue, 25 Feb 2003 21:20:50 -0500 |
Update of /cvsroot/dotgnu-pnet/cscctest/csharp/class
In directory subversions:/tmp/cvs-serv16007/csharp/class
Modified Files:
Makefile.am method9.err method9.jerr
Added Files:
abstract1.cs abstract1.err abstract1.jerr
Log Message:
New test cases for abstract checks.
--- NEW FILE ---
/*
* abstract1.cs - Test abstract class declarations.
*
* Copyright (C) 2003 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
*/
public class Test
{
// abstract used on members in a non-abstract class.
public abstract void t1();
public abstract int X { get; set; }
}
public abstract class Test2
{
// These definitions should be ok because Test2 is abstract.
public abstract void t1();
public abstract int X { get; set; }
}
public abstract class Test3 : Test2
{
// OK - no need to override parent definitions.
}
public class Test4 : Test2
{
// Error - must override parent definitions.
}
public abstract class Test5 : Test2
{
// OK - all abstract parent definitions overrriden.
public override void t1() {}
public override int X { get { return 0; } set {} }
}
--- NEW FILE ---
./abstract1.cs:40: no override for abstract member `virtual void Test2.t1()'
./abstract1.cs:40: no override for abstract member `virtual int Test2.get_X()'
./abstract1.cs:40: no override for abstract member `virtual void
Test2.set_X(int)'
./abstract1.cs:24: `abstract' used on a member in a non-abstract class
./abstract1.cs:25: `abstract' used on a member in a non-abstract class
./abstract1.cs:25: `abstract' used on a member in a non-abstract class
--- NEW FILE ---
./abstract1.cs:40: no override for abstract member `virtual void Test2.t1()'
./abstract1.cs:40: no override for abstract member `virtual int Test2.get_X()'
./abstract1.cs:40: no override for abstract member `virtual void
Test2.set_X(int)'
./abstract1.cs:24: `abstract' used on a member in a non-abstract class
./abstract1.cs:25: `abstract' used on a member in a non-abstract class
./abstract1.cs:25: `abstract' used on a member in a non-abstract class
Index: Makefile.am
===================================================================
RCS file: /cvsroot/dotgnu-pnet/cscctest/csharp/class/Makefile.am,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** Makefile.am 14 Feb 2003 14:13:46 -0000 1.31
--- Makefile.am 26 Feb 2003 02:20:47 -0000 1.32
***************
*** 1,4 ****
! TESTS = ainit1.cs \
const1.cs \
const2.cs \
--- 1,5 ----
! TESTS = abstract1.cs \
! ainit1.cs \
const1.cs \
const2.cs \
Index: method9.err
===================================================================
RCS file: /cvsroot/dotgnu-pnet/cscctest/csharp/class/method9.err,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** method9.err 20 Mar 2002 01:11:54 -0000 1.1
--- method9.err 26 Feb 2003 02:20:47 -0000 1.2
***************
*** 1,2 ****
--- 1,4 ----
+ ./method9.cs:23: `abstract' used on a member in a non-abstract class
+ ./method9.cs:24: `abstract' used on a member in a non-abstract class
./method9.cs:24: `abstract' cannot be used with a method body
./method9.cs:27: `extern' cannot be used with a method body
Index: method9.jerr
===================================================================
RCS file: /cvsroot/dotgnu-pnet/cscctest/csharp/class/method9.jerr,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** method9.jerr 20 Mar 2002 01:11:54 -0000 1.1
--- method9.jerr 26 Feb 2003 02:20:47 -0000 1.2
***************
*** 1,2 ****
--- 1,4 ----
+ ./method9.cs:23: `abstract' used on a member in a non-abstract class
+ ./method9.cs:24: `abstract' used on a member in a non-abstract class
./method9.cs:24: `abstract' cannot be used with a method body
./method9.cs:27: `extern' cannot be used with a method body
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: cscctest/csharp/class abstract1.cs,NONE,1.1 abstract1.err,NONE,1.1 abstract1.jerr,NONE,1.1 Makefile.am,1.31,1.32 method9.err,1.1,1.2 method9.jerr,1.1,1.2,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: cscctest ChangeLog,1.139,1.140
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnet/codegen cg_gen.c,1.45,1.46 cg_gen.h,1.37,1.38
- Previous by thread:
[Dotgnu-pnet-commits] CVS: cscctest ChangeLog,1.139,1.140
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnet/codegen cg_gen.c,1.45,1.46 cg_gen.h,1.37,1.38
- Index(es):