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/stmt using1.cs,NONE,1.1 using


From: Gopal.V <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: cscctest/csharp/stmt using1.cs,NONE,1.1 using1.err,NONE,1.1 using1.jerr,NONE,1.1 using2.cs,NONE,1.1 using2.err,NONE,1.1 using2.jerr,NONE,1.1 Makefile.am,1.12,1.13
Date: Sun, 17 Nov 2002 04:20:51 -0500

Update of /cvsroot/dotgnu-pnet/cscctest/csharp/stmt
In directory subversions:/tmp/cvs-serv32078/csharp/stmt

Modified Files:
        Makefile.am 
Added Files:
        using1.cs using1.err using1.jerr using2.cs using2.err 
        using2.jerr 
Log Message:
basic tests for using alias code


--- NEW FILE ---
/*
 * using1.cs - Test scoping of using aliases - valid cases.
 *
 * 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 f = Foo;
using f2 = Foo.Child;
using c = Bar;
using i32 = Int32;

public class Foo 
{
        public static int c; // overrides using c = Bar;
        static Child child = new Child();
        public static void Override1() 
        {
                c=12;
        }
        public class Child
        {
                public i32 i32 // the dreaded multiple naming
                {
                        get
                        {
                                return 12;
                        }
                }
        }
}
class Bar 
{
        public static void NormalCase() 
        {
                for(i32 x=0;x<10;x++);
                int x=f.child.i32;
                f.Override1();
        }
}

--- NEW FILE ---
./using1.cs:50: incompatible types in assignment: no conversion from `invalid 
type' to `int'

--- NEW FILE ---
./using1.cs:50: incompatible types in assignment: no conversion from `invalid 
type' to `int'

--- NEW FILE ---
/*
 * using2.cs - Test scoping of using aliases - invalid cases.
 *
 * 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=Foo;
using Foo = Foo;
using X = Y;
using Y = X;
using s = System;
class UsingError 
{
        public static int Err() 
        {
                s.Bar x; // no type named System.Bar
                s.Bar(); // no System.Bar() ;
                X.foo(); // X is invalid
                Foo.Foo(); // No Foo.Foo(); either ..
                return 0;
        }
}

--- NEW FILE ---
./using2.cs:21: `System' is already declared
./using2.cs:30: invalid type specification
./using2.cs:31: called object is not a method or delegate
./using2.cs:23: circularity detected in 'Using' declaration
./using2.cs:23: circularity detected in 'Using' declaration
./using2.cs:32: called object is not a method or delegate
./using2.cs:22: circularity detected in 'Using' declaration
./using2.cs:22: circularity detected in 'Using' declaration
./using2.cs:33: called object is not a method or delegate

--- NEW FILE ---
./using2.cs:21: `System' is already declared
./using2.cs:30: invalid type specification
./using2.cs:31: called object is not a method or delegate
./using2.cs:23: circularity detected in 'Using' declaration
./using2.cs:23: circularity detected in 'Using' declaration
./using2.cs:32: called object is not a method or delegate
./using2.cs:22: circularity detected in 'Using' declaration
./using2.cs:22: circularity detected in 'Using' declaration
./using2.cs:33: called object is not a method or delegate

Index: Makefile.am
===================================================================
RCS file: /cvsroot/dotgnu-pnet/cscctest/csharp/stmt/Makefile.am,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** Makefile.am 13 Nov 2002 20:51:10 -0000      1.12
--- Makefile.am 17 Nov 2002 09:20:49 -0000      1.13
***************
*** 18,22 ****
                switch3.cs \
                switch4.cs \
!               switch5.cs
  
  TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tools/run_test.sh
--- 18,24 ----
                switch3.cs \
                switch4.cs \
!               switch5.cs \
!               using1.cs \
!               using2.cs
  
  TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tools/run_test.sh





reply via email to

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