1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance 9# with the License. You may obtain a copy of the License at 10# 11# http://www.apache.org/licenses/LICENSE-2.0 12# 13# Unless required by applicable law or agreed to in writing, 14# software distributed under the License is distributed on an 15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16# KIND, either express or implied. See the License for the 17# specific language governing permissions and limitations 18# under the License. 19# 20#************************************************************** 21 22EXPECT SUCCESS "polystruct.tests 1": 23struct Struct<T> { T member; }; 24 25 26EXPECT FAILURE "polystruct.tests 2": 27struct Struct<T,U,T,V> { long member; }; 28 29 30EXPECT FAILURE "polystruct.tests 3": 31struct Struct<T> { long member; }; 32typedef Struct Typedef; 33 34 35EXPECT FAILURE "polystruct.tests 4": 36struct Struct<T> { long member; }; 37typedef Struct<long> Typedef; 38 39 40EXPECT SUCCESS "polystruct.tests 5": 41struct Struct<T> { long member; }; 42 43 44EXPECT SUCCESS "polystruct.tests 6": 45struct Struct1<T> { T member; }; 46struct Struct2 { Struct1<long> member; }; 47 48 49EXPECT SUCCESS "polystruct.tests 7": 50struct Struct1<T> { T member; }; 51struct Struct2 { Struct1<Struct1<string> > member; }; 52 53 54EXPECT FAILURE "polystruct.tests 8": 55struct Struct1<T> { T member; }; 56struct Struct2 { Struct1<int> member; }; 57 58 59EXPECT FAILURE "polystruct.tests 9": 60struct Struct1<T> { T member; }; 61struct Struct2 { Struct1<long,long> member; }; 62 63 64EXPECT FAILURE "polystruct.tests 10": 65struct Struct2 { Struct1<long> member; }; 66 67 68EXPECT FAILURE "polystruct.tests 11": 69struct Struct1<T> { T member; }; 70struct Struct2 { Struct1<> member; }; 71 72 73EXPECT FAILURE "polystruct.tests 12": 74struct Struct1<T> { T member; }; 75struct Struct2 { Struct1<void> member; }; 76 77 78EXPECT FAILURE "polystruct.tests 13": 79exception Exception {}; 80struct Struct1<T> { T member; }; 81struct Struct2 { Struct1<Exception> member; }; 82 83 84EXPECT SUCCESS "polystruct.tests 14": 85struct Struct<T> { T T; }; 86 87 88EXPECT SUCCESS "polystruct.tests 15": 89struct Struct<Struct> { Struct member; }; 90 91 92EXPECT FAILURE "polystruct.tests 16": 93struct Struct<Struct> { Struct<long> member; }; 94 95 96EXPECT FAILURE "polystruct.tests 17": 97struct Struct<Struct> { ::Struct member; }; 98 99 100EXPECT FAILURE "polystruct.tests 18": 101struct Struct<Struct> { ::Struct<long> member; }; 102 103 104EXPECT SUCCESS "polystruct.tests 19": 105struct Struct1<T> { T member; }; 106struct Struct2<Struct1> { Struct1 member; }; 107 108 109EXPECT SUCCESS "polystruct.tests 20": 110struct Struct1<T> { T member; }; 111struct Struct2<Struct1> { Struct1<long> member; }; 112 113 114EXPECT SUCCESS "polystruct.tests 21": 115struct Struct1<T> { T member; }; 116struct Struct2<Struct1> { ::Struct1<long> member; }; 117 118 119EXPECT FAILURE "polystruct.tests 22": 120struct Struct1 { long member1; }; 121struct Struct2<T>: Struct1 { long member2; }; 122 123 124EXPECT FAILURE "polystruct.tests 23": 125struct Struct1<T> { long member1; }; 126struct Struct2: Struct1<long> { long member2; }; 127 128 129EXPECT FAILURE "polystruct.tests 24": 130struct Struct1<T> { long member1; }; 131struct Struct2<T>: Struct1<long> { long member2; }; 132 133 134EXPECT FAILURE "polystruct.tests 25": 135struct Struct1<T> { long member; }; 136struct Struct2 { Struct1<Struct2> member; }; 137 138 139EXPECT FAILURE "polystruct.tests 26": 140struct Struct1<T> { long member; }; 141struct Struct2<T> { long member; }; 142struct Struct3 { Struct1<Struct2<Struct3> > member; }; 143 144 145EXPECT SUCCESS "polystruct.tests 27": 146struct Struct1<T> { long member; }; 147struct Struct2 { Struct1<sequence<Struct2> > member; }; 148 149 150EXPECT SUCCESS "polystruct.tests 28": 151struct Struct1<T> { long member; }; 152struct Struct2 { Struct1<sequence<sequence<Struct2> > > member; }; 153 154 155EXPECT SUCCESS "polystruct.tests 29": 156struct Struct1<T> { long member; }; 157struct Struct2 { sequence<Struct1<Struct2> > member; }; 158 159 160EXPECT SUCCESS "polystruct.tests 30": 161struct Struct1<T> { long member; }; 162struct Struct2 { sequence<Struct1<sequence<Struct2> > > member; }; 163 164 165EXPECT SUCCESS "polystruct.tests 31": 166struct Struct1<T> { long member; }; 167struct Struct2 { sequence<sequence<Struct1<Struct2> > > member; }; 168 169 170EXPECT FAILURE "polystruct.tests 32": 171struct Struct<T> { Struct member; }; 172 173 174EXPECT FAILURE "polystruct.tests 33": 175struct Struct<T> { Struct<long> member; }; 176 177 178EXPECT FAILURE "polystruct.tests 34": 179struct Struct<T> { Struct<Struct> member; }; 180 181 182EXPECT FAILURE "polystruct.tests 35": 183struct Struct<T> { Struct<Struct<long> > member; }; 184 185 186EXPECT FAILURE "polystruct.tests 36": 187struct Struct1<T> { long member; }; 188struct Struct2<T> { Struct1<Struct2> member; }; 189 190 191EXPECT FAILURE "polystruct.tests 37": 192struct Struct1<T> { long member; }; 193struct Struct2<T> { long member; }; 194struct Struct3<T> { Struct1<Struct2<Struct3> > member; }; 195 196 197EXPECT FAILURE "polystruct.tests 38": 198struct Struct1<T> { long member; }; 199struct Struct2<T> { Struct1<Struct2<long> > member; }; 200 201 202EXPECT FAILURE "polystruct.tests 39": 203struct Struct1<T> { long member; }; 204struct Struct2<T> { long member; }; 205struct Struct3<T> { Struct1<Struct2<Struct3<long> > > member; }; 206 207 208EXPECT FAILURE "polystruct.tests 40": 209struct Struct1<T> { long member; }; 210struct Struct2 { Struct1<unsigned short> member; }; 211 212 213EXPECT FAILURE "polystruct.tests 41": 214struct Struct1<T, U> { long member; }; 215struct Struct2<T> { long member; }; 216struct Struct3 { Struct2<Struct1<long, unsigned long> > member; }; 217 218 219EXPECT FAILURE "polystruct.tests 42": 220struct Struct<T> { long member; }; 221interface X { void f([in] Struct<unsigned hyper> p); }; 222 223 224EXPECT FAILURE "polystruct.tests 43": 225struct Struct1<T> { long member; }; 226struct Struct2 { Struct1<sequence<unsigned short> > member; }; 227 228 229EXPECT SUCCESS "polystruct.tests 44": 230struct Struct1<T> { long member; }; 231struct Struct2 { Struct1<sequence<char> > member; }; 232 233 234EXPECT FAILURE "polystruct.tests 45": 235struct Struct1<T> { long member; }; 236typedef unsigned short td; 237struct Struct2 { Struct1<td> member; }; 238 239 240EXPECT FAILURE "polystruct.tests 46": 241struct Struct1<T> { long member; }; 242typedef sequence<unsigned short> td; 243struct Struct2 { Struct1<td> member; }; 244 245 246EXPECT FAILURE "polystruct.tests 47": 247struct Struct1<T> { long member; }; 248typedef unsigned short td; 249struct Struct2 { Struct1<sequence<td> > member; }; 250