logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

Nice/testsuite/compiler/classes field-override.testsuite,NONE,1.1 fields.te: msg#00131

lang.nice.cvs

Subject: Nice/testsuite/compiler/classes field-override.testsuite,NONE,1.1 fields.testsuite,1.10,1.11

Update of /cvsroot/nice/Nice/testsuite/compiler/classes
In directory sc8-pr-cvs1:/tmp/cvs-serv14144/testsuite/compiler/classes

Modified Files:
fields.testsuite
Added Files:
field-override.testsuite
Log Message:
Added field overriding.


--- NEW FILE: field-override.testsuite ---
/// PASS
/// Toplevel
class A
{
final A x;
}

class B extends A
{
override B x;
}

/// FAIL
/// Toplevel
class A
{
A x;
}

class B extends A
{
override B x;
}

/// FAIL
/// Toplevel
class A
{
override A x;
}

/// FAIL
/// Toplevel
class A
{
A x;
}

class B extends A
{
override B dummy;
}

/// PASS
/// Toplevel
class A
{
final A x;
}

class B extends A
{
override B x;
}

B goo(B b) = new B(x: b).x;

/// FAIL
/// Toplevel
class A
{
final A x;
}

class B extends A
{
override B x;
}

B goo(A a) = new B(x: a);

/// FAIL
/// Toplevel
class A
{
final A x;
}

class B extends A
{
override String x;
}

/// FAIL
/// Toplevel
class A
{
final A x;
}

class B extends A
{
override C x;
}
class C extends B
{
override B x;
}

/// PASS
/// Toplevel
class A<T>
{
final List<T> x;
}

class B<T> extends A
{
override LinkedList<T> x;
}

/// FAIL
/// Toplevel
class A<T>
{
final List<String> x;
}

class B<T> extends A
{
override List<T> x;
}

/// FAIL
/// Toplevel
class A<T>
{
final List<T> x;
}

class B<T> extends A
{
override List<String> x;
}

/// FAIL
/// Toplevel
class A
{
final List<String> names = new ArrayList();
}
class B extends A
{
override LinkedList<String> /* /// FAIL HERE */ names;
}

/// PASS
LinkedList<String> l = new B().names;
/// Toplevel
class A
{
final List<String> names = new ArrayList();
}
class B extends A
{
override LinkedList<String> names = new LinkedList();
}

Index: fields.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/classes/fields.testsuite,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** fields.testsuite 27 Jul 2003 23:37:36 -0000 1.10
--- fields.testsuite 31 Jul 2003 18:45:35 -0000 1.11
***************
*** 101,102 ****
--- 101,117 ----
final Class[] classes = [Foo.class, Bar.class];
}
+
+ /// FAIL
+ /// Toplevel
+ class A { int x; int x; }
+
+ /// FAIL
+ /// Toplevel
+ class A { int x; }
+ class B extends A { int /* /// FAIL HERE */ x; }
+ class C extends B {}
+
+ /// FAIL
+ /// Toplevel
+ class A { final int x = 1; }
+ int f(A a) = a.x++;




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01





Only community members can participate in forum threads. You must Register or log in to contribute.

<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo