1*cdf0e10cSrcweir#************************************************************************* 2*cdf0e10cSrcweir# 3*cdf0e10cSrcweir# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir# 5*cdf0e10cSrcweir# Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir# 7*cdf0e10cSrcweir# OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir# 9*cdf0e10cSrcweir# This file is part of OpenOffice.org. 10*cdf0e10cSrcweir# 11*cdf0e10cSrcweir# OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir# it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir# only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir# 15*cdf0e10cSrcweir# OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir# but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir# GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir# (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir# 21*cdf0e10cSrcweir# You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir# version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir# <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir# for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir# 26*cdf0e10cSrcweir#************************************************************************* 27*cdf0e10cSrcweir 28*cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 1": 29*cdf0e10cSrcweirstruct Struct<T> { T member; }; 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir 32*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 2": 33*cdf0e10cSrcweirstruct Struct<T,U,T,V> { long member; }; 34*cdf0e10cSrcweir 35*cdf0e10cSrcweir 36*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 3": 37*cdf0e10cSrcweirstruct Struct<T> { long member; }; 38*cdf0e10cSrcweirtypedef Struct Typedef; 39*cdf0e10cSrcweir 40*cdf0e10cSrcweir 41*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 4": 42*cdf0e10cSrcweirstruct Struct<T> { long member; }; 43*cdf0e10cSrcweirtypedef Struct<long> Typedef; 44*cdf0e10cSrcweir 45*cdf0e10cSrcweir 46*cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 5": 47*cdf0e10cSrcweirstruct Struct<T> { long member; }; 48*cdf0e10cSrcweir 49*cdf0e10cSrcweir 50*cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 6": 51*cdf0e10cSrcweirstruct Struct1<T> { T member; }; 52*cdf0e10cSrcweirstruct Struct2 { Struct1<long> member; }; 53*cdf0e10cSrcweir 54*cdf0e10cSrcweir 55*cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 7": 56*cdf0e10cSrcweirstruct Struct1<T> { T member; }; 57*cdf0e10cSrcweirstruct Struct2 { Struct1<Struct1<string> > member; }; 58*cdf0e10cSrcweir 59*cdf0e10cSrcweir 60*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 8": 61*cdf0e10cSrcweirstruct Struct1<T> { T member; }; 62*cdf0e10cSrcweirstruct Struct2 { Struct1<int> member; }; 63*cdf0e10cSrcweir 64*cdf0e10cSrcweir 65*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 9": 66*cdf0e10cSrcweirstruct Struct1<T> { T member; }; 67*cdf0e10cSrcweirstruct Struct2 { Struct1<long,long> member; }; 68*cdf0e10cSrcweir 69*cdf0e10cSrcweir 70*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 10": 71*cdf0e10cSrcweirstruct Struct2 { Struct1<long> member; }; 72*cdf0e10cSrcweir 73*cdf0e10cSrcweir 74*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 11": 75*cdf0e10cSrcweirstruct Struct1<T> { T member; }; 76*cdf0e10cSrcweirstruct Struct2 { Struct1<> member; }; 77*cdf0e10cSrcweir 78*cdf0e10cSrcweir 79*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 12": 80*cdf0e10cSrcweirstruct Struct1<T> { T member; }; 81*cdf0e10cSrcweirstruct Struct2 { Struct1<void> member; }; 82*cdf0e10cSrcweir 83*cdf0e10cSrcweir 84*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 13": 85*cdf0e10cSrcweirexception Exception {}; 86*cdf0e10cSrcweirstruct Struct1<T> { T member; }; 87*cdf0e10cSrcweirstruct Struct2 { Struct1<Exception> member; }; 88*cdf0e10cSrcweir 89*cdf0e10cSrcweir 90*cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 14": 91*cdf0e10cSrcweirstruct Struct<T> { T T; }; 92*cdf0e10cSrcweir 93*cdf0e10cSrcweir 94*cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 15": 95*cdf0e10cSrcweirstruct Struct<Struct> { Struct member; }; 96*cdf0e10cSrcweir 97*cdf0e10cSrcweir 98*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 16": 99*cdf0e10cSrcweirstruct Struct<Struct> { Struct<long> member; }; 100*cdf0e10cSrcweir 101*cdf0e10cSrcweir 102*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 17": 103*cdf0e10cSrcweirstruct Struct<Struct> { ::Struct member; }; 104*cdf0e10cSrcweir 105*cdf0e10cSrcweir 106*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 18": 107*cdf0e10cSrcweirstruct Struct<Struct> { ::Struct<long> member; }; 108*cdf0e10cSrcweir 109*cdf0e10cSrcweir 110*cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 19": 111*cdf0e10cSrcweirstruct Struct1<T> { T member; }; 112*cdf0e10cSrcweirstruct Struct2<Struct1> { Struct1 member; }; 113*cdf0e10cSrcweir 114*cdf0e10cSrcweir 115*cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 20": 116*cdf0e10cSrcweirstruct Struct1<T> { T member; }; 117*cdf0e10cSrcweirstruct Struct2<Struct1> { Struct1<long> member; }; 118*cdf0e10cSrcweir 119*cdf0e10cSrcweir 120*cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 21": 121*cdf0e10cSrcweirstruct Struct1<T> { T member; }; 122*cdf0e10cSrcweirstruct Struct2<Struct1> { ::Struct1<long> member; }; 123*cdf0e10cSrcweir 124*cdf0e10cSrcweir 125*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 22": 126*cdf0e10cSrcweirstruct Struct1 { long member1; }; 127*cdf0e10cSrcweirstruct Struct2<T>: Struct1 { long member2; }; 128*cdf0e10cSrcweir 129*cdf0e10cSrcweir 130*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 23": 131*cdf0e10cSrcweirstruct Struct1<T> { long member1; }; 132*cdf0e10cSrcweirstruct Struct2: Struct1<long> { long member2; }; 133*cdf0e10cSrcweir 134*cdf0e10cSrcweir 135*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 24": 136*cdf0e10cSrcweirstruct Struct1<T> { long member1; }; 137*cdf0e10cSrcweirstruct Struct2<T>: Struct1<long> { long member2; }; 138*cdf0e10cSrcweir 139*cdf0e10cSrcweir 140*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 25": 141*cdf0e10cSrcweirstruct Struct1<T> { long member; }; 142*cdf0e10cSrcweirstruct Struct2 { Struct1<Struct2> member; }; 143*cdf0e10cSrcweir 144*cdf0e10cSrcweir 145*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 26": 146*cdf0e10cSrcweirstruct Struct1<T> { long member; }; 147*cdf0e10cSrcweirstruct Struct2<T> { long member; }; 148*cdf0e10cSrcweirstruct Struct3 { Struct1<Struct2<Struct3> > member; }; 149*cdf0e10cSrcweir 150*cdf0e10cSrcweir 151*cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 27": 152*cdf0e10cSrcweirstruct Struct1<T> { long member; }; 153*cdf0e10cSrcweirstruct Struct2 { Struct1<sequence<Struct2> > member; }; 154*cdf0e10cSrcweir 155*cdf0e10cSrcweir 156*cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 28": 157*cdf0e10cSrcweirstruct Struct1<T> { long member; }; 158*cdf0e10cSrcweirstruct Struct2 { Struct1<sequence<sequence<Struct2> > > member; }; 159*cdf0e10cSrcweir 160*cdf0e10cSrcweir 161*cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 29": 162*cdf0e10cSrcweirstruct Struct1<T> { long member; }; 163*cdf0e10cSrcweirstruct Struct2 { sequence<Struct1<Struct2> > member; }; 164*cdf0e10cSrcweir 165*cdf0e10cSrcweir 166*cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 30": 167*cdf0e10cSrcweirstruct Struct1<T> { long member; }; 168*cdf0e10cSrcweirstruct Struct2 { sequence<Struct1<sequence<Struct2> > > member; }; 169*cdf0e10cSrcweir 170*cdf0e10cSrcweir 171*cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 31": 172*cdf0e10cSrcweirstruct Struct1<T> { long member; }; 173*cdf0e10cSrcweirstruct Struct2 { sequence<sequence<Struct1<Struct2> > > member; }; 174*cdf0e10cSrcweir 175*cdf0e10cSrcweir 176*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 32": 177*cdf0e10cSrcweirstruct Struct<T> { Struct member; }; 178*cdf0e10cSrcweir 179*cdf0e10cSrcweir 180*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 33": 181*cdf0e10cSrcweirstruct Struct<T> { Struct<long> member; }; 182*cdf0e10cSrcweir 183*cdf0e10cSrcweir 184*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 34": 185*cdf0e10cSrcweirstruct Struct<T> { Struct<Struct> member; }; 186*cdf0e10cSrcweir 187*cdf0e10cSrcweir 188*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 35": 189*cdf0e10cSrcweirstruct Struct<T> { Struct<Struct<long> > member; }; 190*cdf0e10cSrcweir 191*cdf0e10cSrcweir 192*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 36": 193*cdf0e10cSrcweirstruct Struct1<T> { long member; }; 194*cdf0e10cSrcweirstruct Struct2<T> { Struct1<Struct2> member; }; 195*cdf0e10cSrcweir 196*cdf0e10cSrcweir 197*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 37": 198*cdf0e10cSrcweirstruct Struct1<T> { long member; }; 199*cdf0e10cSrcweirstruct Struct2<T> { long member; }; 200*cdf0e10cSrcweirstruct Struct3<T> { Struct1<Struct2<Struct3> > member; }; 201*cdf0e10cSrcweir 202*cdf0e10cSrcweir 203*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 38": 204*cdf0e10cSrcweirstruct Struct1<T> { long member; }; 205*cdf0e10cSrcweirstruct Struct2<T> { Struct1<Struct2<long> > member; }; 206*cdf0e10cSrcweir 207*cdf0e10cSrcweir 208*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 39": 209*cdf0e10cSrcweirstruct Struct1<T> { long member; }; 210*cdf0e10cSrcweirstruct Struct2<T> { long member; }; 211*cdf0e10cSrcweirstruct Struct3<T> { Struct1<Struct2<Struct3<long> > > member; }; 212*cdf0e10cSrcweir 213*cdf0e10cSrcweir 214*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 40": 215*cdf0e10cSrcweirstruct Struct1<T> { long member; }; 216*cdf0e10cSrcweirstruct Struct2 { Struct1<unsigned short> member; }; 217*cdf0e10cSrcweir 218*cdf0e10cSrcweir 219*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 41": 220*cdf0e10cSrcweirstruct Struct1<T, U> { long member; }; 221*cdf0e10cSrcweirstruct Struct2<T> { long member; }; 222*cdf0e10cSrcweirstruct Struct3 { Struct2<Struct1<long, unsigned long> > member; }; 223*cdf0e10cSrcweir 224*cdf0e10cSrcweir 225*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 42": 226*cdf0e10cSrcweirstruct Struct<T> { long member; }; 227*cdf0e10cSrcweirinterface X { void f([in] Struct<unsigned hyper> p); }; 228*cdf0e10cSrcweir 229*cdf0e10cSrcweir 230*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 43": 231*cdf0e10cSrcweirstruct Struct1<T> { long member; }; 232*cdf0e10cSrcweirstruct Struct2 { Struct1<sequence<unsigned short> > member; }; 233*cdf0e10cSrcweir 234*cdf0e10cSrcweir 235*cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 44": 236*cdf0e10cSrcweirstruct Struct1<T> { long member; }; 237*cdf0e10cSrcweirstruct Struct2 { Struct1<sequence<char> > member; }; 238*cdf0e10cSrcweir 239*cdf0e10cSrcweir 240*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 45": 241*cdf0e10cSrcweirstruct Struct1<T> { long member; }; 242*cdf0e10cSrcweirtypedef unsigned short td; 243*cdf0e10cSrcweirstruct Struct2 { Struct1<td> member; }; 244*cdf0e10cSrcweir 245*cdf0e10cSrcweir 246*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 46": 247*cdf0e10cSrcweirstruct Struct1<T> { long member; }; 248*cdf0e10cSrcweirtypedef sequence<unsigned short> td; 249*cdf0e10cSrcweirstruct Struct2 { Struct1<td> member; }; 250*cdf0e10cSrcweir 251*cdf0e10cSrcweir 252*cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 47": 253*cdf0e10cSrcweirstruct Struct1<T> { long member; }; 254*cdf0e10cSrcweirtypedef unsigned short td; 255*cdf0e10cSrcweirstruct Struct2 { Struct1<sequence<td> > member; }; 256