1// { dg-options "-w -ansi -pedantic" } 2 3// Copyright (C) 2003 Free Software Foundation, Inc. 4// Contributed by Nathan Sidwell 23 Oct 2003 <nathan@codesourcery.com> 5 6extern "Java" { 7 class One 8 { 9 ~One (); // { dg-error "cannot have a destructor" "" } 10 One (); 11 }; 12 13 class Two {}; 14 15 class Three : One {}; // { dg-error "cannot have an implicit" "" } 16 17 class Four : Two {}; 18 19 class Five : Two, Four {}; // { dg-error "cannot have multiple bases" "" } 20 21 class Six : virtual Two {}; // { dg-error "cannot have virtual base" "" } 22} 23