summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/other/java1.C
blob: 38b5e0c3070111a08438605c2960cd62f9801584 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// { dg-options "-w -ansi -pedantic" }

// Copyright (C) 2003 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 23 Oct 2003 <nathan@codesourcery.com>

extern "Java" {
  class One 
  {
    ~One (); // { dg-error "cannot have a destructor" "" }
    One ();
  };

  class Two {};

  class Three : One {}; // { dg-error "cannot have an implicit" "" }

  class Four : Two {};

  class Five : Two, Four {}; //  { dg-error "cannot have multiple bases" "" }

  class Six : virtual Two {}; // { dg-error "cannot have virtual base" "" }
}