| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 import 'dart:_js_helper'; |
| 6 |
| 7 // JavaScript reserved words: |
| 8 // |
| 9 // break |
| 10 // case |
| 11 // catch |
| 12 // class |
| 13 // const |
| 14 // continue |
| 15 // debugger |
| 16 // default |
| 17 // delete |
| 18 // do |
| 19 // else |
| 20 // enum |
| 21 // export |
| 22 // extends |
| 23 // false |
| 24 // finally |
| 25 // for |
| 26 // function |
| 27 // if |
| 28 // implements |
| 29 // import |
| 30 // in |
| 31 // instanceof |
| 32 // interface |
| 33 // let |
| 34 // new |
| 35 // null |
| 36 // package |
| 37 // private |
| 38 // protected |
| 39 // public |
| 40 // return |
| 41 // static |
| 42 // super |
| 43 // switch |
| 44 // this |
| 45 // throw |
| 46 // true |
| 47 // try |
| 48 // typeof |
| 49 // var |
| 50 // void |
| 51 // while |
| 52 // with |
| 53 // yield |
| 54 // |
| 55 // Funny thing in JavaScript: there are two syntactic categories: |
| 56 // "Identifier" and "IdentifierName". The latter includes reserved |
| 57 // words. This is legal JavaScript according to ECMA-262.5: |
| 58 // |
| 59 // this.default |
| 60 // |
| 61 // See section 11.2 "Left-Hand-Side Expressions" which states that a |
| 62 // "MemberExpression" includes: "MemberExpression . IdentifierName". |
| 63 |
| 64 class NativeClassWithOddNames native "NativeClassWithOddNames" { |
| 65 @JSName('break') bool breakValue; |
| 66 @JSName('case') bool caseValue; |
| 67 @JSName('catch') bool catchValue; |
| 68 @JSName('class') bool classValue; |
| 69 @JSName('const') bool constValue; |
| 70 @JSName('continue') bool continueValue; |
| 71 @JSName('debugger') bool debuggerValue; |
| 72 @JSName('default') bool defaultValue; |
| 73 @JSName('delete') bool deleteValue; |
| 74 @JSName('do') bool doValue; |
| 75 @JSName('else') bool elseValue; |
| 76 @JSName('enum') bool enumValue; |
| 77 @JSName('export') bool exportValue; |
| 78 @JSName('extends') bool extendsValue; |
| 79 @JSName('false') bool falseValue; |
| 80 @JSName('finally') bool finallyValue; |
| 81 @JSName('for') bool forValue; |
| 82 @JSName('function') bool functionValue; |
| 83 @JSName('if') bool ifValue; |
| 84 @JSName('implements') bool implementsValue; |
| 85 @JSName('import') bool importValue; |
| 86 @JSName('in') bool inValue; |
| 87 @JSName('instanceof') bool instanceofValue; |
| 88 @JSName('interface') bool interfaceValue; |
| 89 @JSName('let') bool letValue; |
| 90 @JSName('new') bool newValue; |
| 91 @JSName('null') bool nullValue; |
| 92 @JSName('package') bool packageValue; |
| 93 @JSName('private') bool privateValue; |
| 94 @JSName('protected') bool protectedValue; |
| 95 @JSName('public') bool publicValue; |
| 96 @JSName('return') bool returnValue; |
| 97 @JSName('static') bool staticValue; |
| 98 @JSName('super') bool superValue; |
| 99 @JSName('switch') bool switchValue; |
| 100 @JSName('this') bool thisValue; |
| 101 @JSName('throw') bool throwValue; |
| 102 @JSName('true') bool trueValue; |
| 103 @JSName('try') bool tryValue; |
| 104 @JSName('typeof') bool typeofValue; |
| 105 @JSName('var') bool varValue; |
| 106 @JSName('void') bool voidValue; |
| 107 @JSName('while') bool whileValue; |
| 108 @JSName('with') bool withValue; |
| 109 @JSName('yield') bool yieldValue; |
| 110 |
| 111 void testMyFields() { |
| 112 |
| 113 if (breakValue != null) throw 'incorrect initialization of "breakValue"'; |
| 114 breakValue = true; |
| 115 if (!breakValue) throw 'incorrect value in "breakValue"'; |
| 116 breakValue = false; |
| 117 if (breakValue) throw 'incorrect value in "breakValue"'; |
| 118 |
| 119 if (caseValue != null) throw 'incorrect initialization of "caseValue"'; |
| 120 caseValue = true; |
| 121 if (!caseValue) throw 'incorrect value in "caseValue"'; |
| 122 caseValue = false; |
| 123 if (caseValue) throw 'incorrect value in "caseValue"'; |
| 124 |
| 125 if (catchValue != null) throw 'incorrect initialization of "catchValue"'; |
| 126 catchValue = true; |
| 127 if (!catchValue) throw 'incorrect value in "catchValue"'; |
| 128 catchValue = false; |
| 129 if (catchValue) throw 'incorrect value in "catchValue"'; |
| 130 |
| 131 if (classValue != null) throw 'incorrect initialization of "classValue"'; |
| 132 classValue = true; |
| 133 if (!classValue) throw 'incorrect value in "classValue"'; |
| 134 classValue = false; |
| 135 if (classValue) throw 'incorrect value in "classValue"'; |
| 136 |
| 137 if (constValue != null) throw 'incorrect initialization of "constValue"'; |
| 138 constValue = true; |
| 139 if (!constValue) throw 'incorrect value in "constValue"'; |
| 140 constValue = false; |
| 141 if (constValue) throw 'incorrect value in "constValue"'; |
| 142 |
| 143 if (continueValue != null) |
| 144 throw 'incorrect initialization of "continueValue"'; |
| 145 continueValue = true; |
| 146 if (!continueValue) throw 'incorrect value in "continueValue"'; |
| 147 continueValue = false; |
| 148 if (continueValue) throw 'incorrect value in "continueValue"'; |
| 149 |
| 150 if (debuggerValue != null) |
| 151 throw 'incorrect initialization of "debuggerValue"'; |
| 152 debuggerValue = true; |
| 153 if (!debuggerValue) throw 'incorrect value in "debuggerValue"'; |
| 154 debuggerValue = false; |
| 155 if (debuggerValue) throw 'incorrect value in "debuggerValue"'; |
| 156 |
| 157 if (defaultValue != null) |
| 158 throw 'incorrect initialization of "defaultValue"'; |
| 159 defaultValue = true; |
| 160 if (!defaultValue) throw 'incorrect value in "defaultValue"'; |
| 161 defaultValue = false; |
| 162 if (defaultValue) throw 'incorrect value in "defaultValue"'; |
| 163 |
| 164 if (deleteValue != null) throw 'incorrect initialization of "deleteValue"'; |
| 165 deleteValue = true; |
| 166 if (!deleteValue) throw 'incorrect value in "deleteValue"'; |
| 167 deleteValue = false; |
| 168 if (deleteValue) throw 'incorrect value in "deleteValue"'; |
| 169 |
| 170 if (doValue != null) throw 'incorrect initialization of "doValue"'; |
| 171 doValue = true; |
| 172 if (!doValue) throw 'incorrect value in "doValue"'; |
| 173 doValue = false; |
| 174 if (doValue) throw 'incorrect value in "doValue"'; |
| 175 |
| 176 if (elseValue != null) throw 'incorrect initialization of "elseValue"'; |
| 177 elseValue = true; |
| 178 if (!elseValue) throw 'incorrect value in "elseValue"'; |
| 179 elseValue = false; |
| 180 if (elseValue) throw 'incorrect value in "elseValue"'; |
| 181 |
| 182 if (enumValue != null) throw 'incorrect initialization of "enumValue"'; |
| 183 enumValue = true; |
| 184 if (!enumValue) throw 'incorrect value in "enumValue"'; |
| 185 enumValue = false; |
| 186 if (enumValue) throw 'incorrect value in "enumValue"'; |
| 187 |
| 188 if (exportValue != null) throw 'incorrect initialization of "exportValue"'; |
| 189 exportValue = true; |
| 190 if (!exportValue) throw 'incorrect value in "exportValue"'; |
| 191 exportValue = false; |
| 192 if (exportValue) throw 'incorrect value in "exportValue"'; |
| 193 |
| 194 if (extendsValue != null) |
| 195 throw 'incorrect initialization of "extendsValue"'; |
| 196 extendsValue = true; |
| 197 if (!extendsValue) throw 'incorrect value in "extendsValue"'; |
| 198 extendsValue = false; |
| 199 if (extendsValue) throw 'incorrect value in "extendsValue"'; |
| 200 |
| 201 if (falseValue != null) throw 'incorrect initialization of "falseValue"'; |
| 202 falseValue = true; |
| 203 if (!falseValue) throw 'incorrect value in "falseValue"'; |
| 204 falseValue = false; |
| 205 if (falseValue) throw 'incorrect value in "falseValue"'; |
| 206 |
| 207 if (finallyValue != null) |
| 208 throw 'incorrect initialization of "finallyValue"'; |
| 209 finallyValue = true; |
| 210 if (!finallyValue) throw 'incorrect value in "finallyValue"'; |
| 211 finallyValue = false; |
| 212 if (finallyValue) throw 'incorrect value in "finallyValue"'; |
| 213 |
| 214 if (forValue != null) throw 'incorrect initialization of "forValue"'; |
| 215 forValue = true; |
| 216 if (!forValue) throw 'incorrect value in "forValue"'; |
| 217 forValue = false; |
| 218 if (forValue) throw 'incorrect value in "forValue"'; |
| 219 |
| 220 if (functionValue != null) |
| 221 throw 'incorrect initialization of "functionValue"'; |
| 222 functionValue = true; |
| 223 if (!functionValue) throw 'incorrect value in "functionValue"'; |
| 224 functionValue = false; |
| 225 if (functionValue) throw 'incorrect value in "functionValue"'; |
| 226 |
| 227 if (ifValue != null) throw 'incorrect initialization of "ifValue"'; |
| 228 ifValue = true; |
| 229 if (!ifValue) throw 'incorrect value in "ifValue"'; |
| 230 ifValue = false; |
| 231 if (ifValue) throw 'incorrect value in "ifValue"'; |
| 232 |
| 233 if (implementsValue != null) |
| 234 throw 'incorrect initialization of "implementsValue"'; |
| 235 implementsValue = true; |
| 236 if (!implementsValue) throw 'incorrect value in "implementsValue"'; |
| 237 implementsValue = false; |
| 238 if (implementsValue) throw 'incorrect value in "implementsValue"'; |
| 239 |
| 240 if (importValue != null) throw 'incorrect initialization of "importValue"'; |
| 241 importValue = true; |
| 242 if (!importValue) throw 'incorrect value in "importValue"'; |
| 243 importValue = false; |
| 244 if (importValue) throw 'incorrect value in "importValue"'; |
| 245 |
| 246 if (inValue != null) throw 'incorrect initialization of "inValue"'; |
| 247 inValue = true; |
| 248 if (!inValue) throw 'incorrect value in "inValue"'; |
| 249 inValue = false; |
| 250 if (inValue) throw 'incorrect value in "inValue"'; |
| 251 |
| 252 if (instanceofValue != null) |
| 253 throw 'incorrect initialization of "instanceofValue"'; |
| 254 instanceofValue = true; |
| 255 if (!instanceofValue) throw 'incorrect value in "instanceofValue"'; |
| 256 instanceofValue = false; |
| 257 if (instanceofValue) throw 'incorrect value in "instanceofValue"'; |
| 258 |
| 259 if (interfaceValue != null) |
| 260 throw 'incorrect initialization of "interfaceValue"'; |
| 261 interfaceValue = true; |
| 262 if (!interfaceValue) throw 'incorrect value in "interfaceValue"'; |
| 263 interfaceValue = false; |
| 264 if (interfaceValue) throw 'incorrect value in "interfaceValue"'; |
| 265 |
| 266 if (letValue != null) throw 'incorrect initialization of "letValue"'; |
| 267 letValue = true; |
| 268 if (!letValue) throw 'incorrect value in "letValue"'; |
| 269 letValue = false; |
| 270 if (letValue) throw 'incorrect value in "letValue"'; |
| 271 |
| 272 if (newValue != null) throw 'incorrect initialization of "newValue"'; |
| 273 newValue = true; |
| 274 if (!newValue) throw 'incorrect value in "newValue"'; |
| 275 newValue = false; |
| 276 if (newValue) throw 'incorrect value in "newValue"'; |
| 277 |
| 278 if (nullValue != null) throw 'incorrect initialization of "nullValue"'; |
| 279 nullValue = true; |
| 280 if (!nullValue) throw 'incorrect value in "nullValue"'; |
| 281 nullValue = false; |
| 282 if (nullValue) throw 'incorrect value in "nullValue"'; |
| 283 |
| 284 if (packageValue != null) |
| 285 throw 'incorrect initialization of "packageValue"'; |
| 286 packageValue = true; |
| 287 if (!packageValue) throw 'incorrect value in "packageValue"'; |
| 288 packageValue = false; |
| 289 if (packageValue) throw 'incorrect value in "packageValue"'; |
| 290 |
| 291 if (privateValue != null) |
| 292 throw 'incorrect initialization of "privateValue"'; |
| 293 privateValue = true; |
| 294 if (!privateValue) throw 'incorrect value in "privateValue"'; |
| 295 privateValue = false; |
| 296 if (privateValue) throw 'incorrect value in "privateValue"'; |
| 297 |
| 298 if (protectedValue != null) |
| 299 throw 'incorrect initialization of "protectedValue"'; |
| 300 protectedValue = true; |
| 301 if (!protectedValue) throw 'incorrect value in "protectedValue"'; |
| 302 protectedValue = false; |
| 303 if (protectedValue) throw 'incorrect value in "protectedValue"'; |
| 304 |
| 305 if (publicValue != null) throw 'incorrect initialization of "publicValue"'; |
| 306 publicValue = true; |
| 307 if (!publicValue) throw 'incorrect value in "publicValue"'; |
| 308 publicValue = false; |
| 309 if (publicValue) throw 'incorrect value in "publicValue"'; |
| 310 |
| 311 if (returnValue != null) throw 'incorrect initialization of "returnValue"'; |
| 312 returnValue = true; |
| 313 if (!returnValue) throw 'incorrect value in "returnValue"'; |
| 314 returnValue = false; |
| 315 if (returnValue) throw 'incorrect value in "returnValue"'; |
| 316 |
| 317 if (staticValue != null) throw 'incorrect initialization of "staticValue"'; |
| 318 staticValue = true; |
| 319 if (!staticValue) throw 'incorrect value in "staticValue"'; |
| 320 staticValue = false; |
| 321 if (staticValue) throw 'incorrect value in "staticValue"'; |
| 322 |
| 323 if (superValue != null) throw 'incorrect initialization of "superValue"'; |
| 324 superValue = true; |
| 325 if (!superValue) throw 'incorrect value in "superValue"'; |
| 326 superValue = false; |
| 327 if (superValue) throw 'incorrect value in "superValue"'; |
| 328 |
| 329 if (switchValue != null) throw 'incorrect initialization of "switchValue"'; |
| 330 switchValue = true; |
| 331 if (!switchValue) throw 'incorrect value in "switchValue"'; |
| 332 switchValue = false; |
| 333 if (switchValue) throw 'incorrect value in "switchValue"'; |
| 334 |
| 335 if (thisValue != null) throw 'incorrect initialization of "thisValue"'; |
| 336 thisValue = true; |
| 337 if (!thisValue) throw 'incorrect value in "thisValue"'; |
| 338 thisValue = false; |
| 339 if (thisValue) throw 'incorrect value in "thisValue"'; |
| 340 |
| 341 if (throwValue != null) throw 'incorrect initialization of "throwValue"'; |
| 342 throwValue = true; |
| 343 if (!throwValue) throw 'incorrect value in "throwValue"'; |
| 344 throwValue = false; |
| 345 if (throwValue) throw 'incorrect value in "throwValue"'; |
| 346 |
| 347 if (trueValue != null) throw 'incorrect initialization of "trueValue"'; |
| 348 trueValue = true; |
| 349 if (!trueValue) throw 'incorrect value in "trueValue"'; |
| 350 trueValue = false; |
| 351 if (trueValue) throw 'incorrect value in "trueValue"'; |
| 352 |
| 353 if (tryValue != null) throw 'incorrect initialization of "tryValue"'; |
| 354 tryValue = true; |
| 355 if (!tryValue) throw 'incorrect value in "tryValue"'; |
| 356 tryValue = false; |
| 357 if (tryValue) throw 'incorrect value in "tryValue"'; |
| 358 |
| 359 if (typeofValue != null) throw 'incorrect initialization of "typeofValue"'; |
| 360 typeofValue = true; |
| 361 if (!typeofValue) throw 'incorrect value in "typeofValue"'; |
| 362 typeofValue = false; |
| 363 if (typeofValue) throw 'incorrect value in "typeofValue"'; |
| 364 |
| 365 if (varValue != null) throw 'incorrect initialization of "varValue"'; |
| 366 varValue = true; |
| 367 if (!varValue) throw 'incorrect value in "varValue"'; |
| 368 varValue = false; |
| 369 if (varValue) throw 'incorrect value in "varValue"'; |
| 370 |
| 371 if (voidValue != null) throw 'incorrect initialization of "voidValue"'; |
| 372 voidValue = true; |
| 373 if (!voidValue) throw 'incorrect value in "voidValue"'; |
| 374 voidValue = false; |
| 375 if (voidValue) throw 'incorrect value in "voidValue"'; |
| 376 |
| 377 if (whileValue != null) throw 'incorrect initialization of "whileValue"'; |
| 378 whileValue = true; |
| 379 if (!whileValue) throw 'incorrect value in "whileValue"'; |
| 380 whileValue = false; |
| 381 if (whileValue) throw 'incorrect value in "whileValue"'; |
| 382 |
| 383 if (withValue != null) throw 'incorrect initialization of "withValue"'; |
| 384 withValue = true; |
| 385 if (!withValue) throw 'incorrect value in "withValue"'; |
| 386 withValue = false; |
| 387 if (withValue) throw 'incorrect value in "withValue"'; |
| 388 |
| 389 if (yieldValue != null) throw 'incorrect initialization of "yieldValue"'; |
| 390 yieldValue = true; |
| 391 if (!yieldValue) throw 'incorrect value in "yieldValue"'; |
| 392 yieldValue = false; |
| 393 if (yieldValue) throw 'incorrect value in "yieldValue"'; |
| 394 |
| 395 } |
| 396 } |
| 397 |
| 398 class ClassWithOddNames { |
| 399 bool breakValue; |
| 400 bool caseValue; |
| 401 bool catchValue; |
| 402 bool classValue; |
| 403 bool constValue; |
| 404 bool continueValue; |
| 405 bool debuggerValue; |
| 406 bool defaultValue; |
| 407 bool deleteValue; |
| 408 bool doValue; |
| 409 bool elseValue; |
| 410 bool enumValue; |
| 411 bool exportValue; |
| 412 bool extendsValue; |
| 413 bool falseValue; |
| 414 bool finallyValue; |
| 415 bool forValue; |
| 416 bool functionValue; |
| 417 bool ifValue; |
| 418 bool implementsValue; |
| 419 bool importValue; |
| 420 bool inValue; |
| 421 bool instanceofValue; |
| 422 bool interfaceValue; |
| 423 bool letValue; |
| 424 bool newValue; |
| 425 bool nullValue; |
| 426 bool packageValue; |
| 427 bool privateValue; |
| 428 bool protectedValue; |
| 429 bool publicValue; |
| 430 bool returnValue; |
| 431 bool staticValue; |
| 432 bool superValue; |
| 433 bool switchValue; |
| 434 bool thisValue; |
| 435 bool throwValue; |
| 436 bool trueValue; |
| 437 bool tryValue; |
| 438 bool typeofValue; |
| 439 bool varValue; |
| 440 bool voidValue; |
| 441 bool whileValue; |
| 442 bool withValue; |
| 443 bool yieldValue; |
| 444 |
| 445 void testMyFields() { |
| 446 |
| 447 if (breakValue != null) throw 'incorrect initialization of "breakValue"'; |
| 448 breakValue = true; |
| 449 if (!breakValue) throw 'incorrect value in "breakValue"'; |
| 450 breakValue = false; |
| 451 if (breakValue) throw 'incorrect value in "breakValue"'; |
| 452 |
| 453 if (caseValue != null) throw 'incorrect initialization of "caseValue"'; |
| 454 caseValue = true; |
| 455 if (!caseValue) throw 'incorrect value in "caseValue"'; |
| 456 caseValue = false; |
| 457 if (caseValue) throw 'incorrect value in "caseValue"'; |
| 458 |
| 459 if (catchValue != null) throw 'incorrect initialization of "catchValue"'; |
| 460 catchValue = true; |
| 461 if (!catchValue) throw 'incorrect value in "catchValue"'; |
| 462 catchValue = false; |
| 463 if (catchValue) throw 'incorrect value in "catchValue"'; |
| 464 |
| 465 if (classValue != null) throw 'incorrect initialization of "classValue"'; |
| 466 classValue = true; |
| 467 if (!classValue) throw 'incorrect value in "classValue"'; |
| 468 classValue = false; |
| 469 if (classValue) throw 'incorrect value in "classValue"'; |
| 470 |
| 471 if (constValue != null) throw 'incorrect initialization of "constValue"'; |
| 472 constValue = true; |
| 473 if (!constValue) throw 'incorrect value in "constValue"'; |
| 474 constValue = false; |
| 475 if (constValue) throw 'incorrect value in "constValue"'; |
| 476 |
| 477 if (continueValue != null) |
| 478 throw 'incorrect initialization of "continueValue"'; |
| 479 continueValue = true; |
| 480 if (!continueValue) throw 'incorrect value in "continueValue"'; |
| 481 continueValue = false; |
| 482 if (continueValue) throw 'incorrect value in "continueValue"'; |
| 483 |
| 484 if (debuggerValue != null) |
| 485 throw 'incorrect initialization of "debuggerValue"'; |
| 486 debuggerValue = true; |
| 487 if (!debuggerValue) throw 'incorrect value in "debuggerValue"'; |
| 488 debuggerValue = false; |
| 489 if (debuggerValue) throw 'incorrect value in "debuggerValue"'; |
| 490 |
| 491 if (defaultValue != null) |
| 492 throw 'incorrect initialization of "defaultValue"'; |
| 493 defaultValue = true; |
| 494 if (!defaultValue) throw 'incorrect value in "defaultValue"'; |
| 495 defaultValue = false; |
| 496 if (defaultValue) throw 'incorrect value in "defaultValue"'; |
| 497 |
| 498 if (deleteValue != null) throw 'incorrect initialization of "deleteValue"'; |
| 499 deleteValue = true; |
| 500 if (!deleteValue) throw 'incorrect value in "deleteValue"'; |
| 501 deleteValue = false; |
| 502 if (deleteValue) throw 'incorrect value in "deleteValue"'; |
| 503 |
| 504 if (doValue != null) throw 'incorrect initialization of "doValue"'; |
| 505 doValue = true; |
| 506 if (!doValue) throw 'incorrect value in "doValue"'; |
| 507 doValue = false; |
| 508 if (doValue) throw 'incorrect value in "doValue"'; |
| 509 |
| 510 if (elseValue != null) throw 'incorrect initialization of "elseValue"'; |
| 511 elseValue = true; |
| 512 if (!elseValue) throw 'incorrect value in "elseValue"'; |
| 513 elseValue = false; |
| 514 if (elseValue) throw 'incorrect value in "elseValue"'; |
| 515 |
| 516 if (enumValue != null) throw 'incorrect initialization of "enumValue"'; |
| 517 enumValue = true; |
| 518 if (!enumValue) throw 'incorrect value in "enumValue"'; |
| 519 enumValue = false; |
| 520 if (enumValue) throw 'incorrect value in "enumValue"'; |
| 521 |
| 522 if (exportValue != null) throw 'incorrect initialization of "exportValue"'; |
| 523 exportValue = true; |
| 524 if (!exportValue) throw 'incorrect value in "exportValue"'; |
| 525 exportValue = false; |
| 526 if (exportValue) throw 'incorrect value in "exportValue"'; |
| 527 |
| 528 if (extendsValue != null) |
| 529 throw 'incorrect initialization of "extendsValue"'; |
| 530 extendsValue = true; |
| 531 if (!extendsValue) throw 'incorrect value in "extendsValue"'; |
| 532 extendsValue = false; |
| 533 if (extendsValue) throw 'incorrect value in "extendsValue"'; |
| 534 |
| 535 if (falseValue != null) throw 'incorrect initialization of "falseValue"'; |
| 536 falseValue = true; |
| 537 if (!falseValue) throw 'incorrect value in "falseValue"'; |
| 538 falseValue = false; |
| 539 if (falseValue) throw 'incorrect value in "falseValue"'; |
| 540 |
| 541 if (finallyValue != null) |
| 542 throw 'incorrect initialization of "finallyValue"'; |
| 543 finallyValue = true; |
| 544 if (!finallyValue) throw 'incorrect value in "finallyValue"'; |
| 545 finallyValue = false; |
| 546 if (finallyValue) throw 'incorrect value in "finallyValue"'; |
| 547 |
| 548 if (forValue != null) throw 'incorrect initialization of "forValue"'; |
| 549 forValue = true; |
| 550 if (!forValue) throw 'incorrect value in "forValue"'; |
| 551 forValue = false; |
| 552 if (forValue) throw 'incorrect value in "forValue"'; |
| 553 |
| 554 if (functionValue != null) |
| 555 throw 'incorrect initialization of "functionValue"'; |
| 556 functionValue = true; |
| 557 if (!functionValue) throw 'incorrect value in "functionValue"'; |
| 558 functionValue = false; |
| 559 if (functionValue) throw 'incorrect value in "functionValue"'; |
| 560 |
| 561 if (ifValue != null) throw 'incorrect initialization of "ifValue"'; |
| 562 ifValue = true; |
| 563 if (!ifValue) throw 'incorrect value in "ifValue"'; |
| 564 ifValue = false; |
| 565 if (ifValue) throw 'incorrect value in "ifValue"'; |
| 566 |
| 567 if (implementsValue != null) |
| 568 throw 'incorrect initialization of "implementsValue"'; |
| 569 implementsValue = true; |
| 570 if (!implementsValue) throw 'incorrect value in "implementsValue"'; |
| 571 implementsValue = false; |
| 572 if (implementsValue) throw 'incorrect value in "implementsValue"'; |
| 573 |
| 574 if (importValue != null) throw 'incorrect initialization of "importValue"'; |
| 575 importValue = true; |
| 576 if (!importValue) throw 'incorrect value in "importValue"'; |
| 577 importValue = false; |
| 578 if (importValue) throw 'incorrect value in "importValue"'; |
| 579 |
| 580 if (inValue != null) throw 'incorrect initialization of "inValue"'; |
| 581 inValue = true; |
| 582 if (!inValue) throw 'incorrect value in "inValue"'; |
| 583 inValue = false; |
| 584 if (inValue) throw 'incorrect value in "inValue"'; |
| 585 |
| 586 if (instanceofValue != null) |
| 587 throw 'incorrect initialization of "instanceofValue"'; |
| 588 instanceofValue = true; |
| 589 if (!instanceofValue) throw 'incorrect value in "instanceofValue"'; |
| 590 instanceofValue = false; |
| 591 if (instanceofValue) throw 'incorrect value in "instanceofValue"'; |
| 592 |
| 593 if (interfaceValue != null) |
| 594 throw 'incorrect initialization of "interfaceValue"'; |
| 595 interfaceValue = true; |
| 596 if (!interfaceValue) throw 'incorrect value in "interfaceValue"'; |
| 597 interfaceValue = false; |
| 598 if (interfaceValue) throw 'incorrect value in "interfaceValue"'; |
| 599 |
| 600 if (letValue != null) throw 'incorrect initialization of "letValue"'; |
| 601 letValue = true; |
| 602 if (!letValue) throw 'incorrect value in "letValue"'; |
| 603 letValue = false; |
| 604 if (letValue) throw 'incorrect value in "letValue"'; |
| 605 |
| 606 if (newValue != null) throw 'incorrect initialization of "newValue"'; |
| 607 newValue = true; |
| 608 if (!newValue) throw 'incorrect value in "newValue"'; |
| 609 newValue = false; |
| 610 if (newValue) throw 'incorrect value in "newValue"'; |
| 611 |
| 612 if (nullValue != null) throw 'incorrect initialization of "nullValue"'; |
| 613 nullValue = true; |
| 614 if (!nullValue) throw 'incorrect value in "nullValue"'; |
| 615 nullValue = false; |
| 616 if (nullValue) throw 'incorrect value in "nullValue"'; |
| 617 |
| 618 if (packageValue != null) |
| 619 throw 'incorrect initialization of "packageValue"'; |
| 620 packageValue = true; |
| 621 if (!packageValue) throw 'incorrect value in "packageValue"'; |
| 622 packageValue = false; |
| 623 if (packageValue) throw 'incorrect value in "packageValue"'; |
| 624 |
| 625 if (privateValue != null) |
| 626 throw 'incorrect initialization of "privateValue"'; |
| 627 privateValue = true; |
| 628 if (!privateValue) throw 'incorrect value in "privateValue"'; |
| 629 privateValue = false; |
| 630 if (privateValue) throw 'incorrect value in "privateValue"'; |
| 631 |
| 632 if (protectedValue != null) |
| 633 throw 'incorrect initialization of "protectedValue"'; |
| 634 protectedValue = true; |
| 635 if (!protectedValue) throw 'incorrect value in "protectedValue"'; |
| 636 protectedValue = false; |
| 637 if (protectedValue) throw 'incorrect value in "protectedValue"'; |
| 638 |
| 639 if (publicValue != null) throw 'incorrect initialization of "publicValue"'; |
| 640 publicValue = true; |
| 641 if (!publicValue) throw 'incorrect value in "publicValue"'; |
| 642 publicValue = false; |
| 643 if (publicValue) throw 'incorrect value in "publicValue"'; |
| 644 |
| 645 if (returnValue != null) throw 'incorrect initialization of "returnValue"'; |
| 646 returnValue = true; |
| 647 if (!returnValue) throw 'incorrect value in "returnValue"'; |
| 648 returnValue = false; |
| 649 if (returnValue) throw 'incorrect value in "returnValue"'; |
| 650 |
| 651 if (staticValue != null) throw 'incorrect initialization of "staticValue"'; |
| 652 staticValue = true; |
| 653 if (!staticValue) throw 'incorrect value in "staticValue"'; |
| 654 staticValue = false; |
| 655 if (staticValue) throw 'incorrect value in "staticValue"'; |
| 656 |
| 657 if (superValue != null) throw 'incorrect initialization of "superValue"'; |
| 658 superValue = true; |
| 659 if (!superValue) throw 'incorrect value in "superValue"'; |
| 660 superValue = false; |
| 661 if (superValue) throw 'incorrect value in "superValue"'; |
| 662 |
| 663 if (switchValue != null) throw 'incorrect initialization of "switchValue"'; |
| 664 switchValue = true; |
| 665 if (!switchValue) throw 'incorrect value in "switchValue"'; |
| 666 switchValue = false; |
| 667 if (switchValue) throw 'incorrect value in "switchValue"'; |
| 668 |
| 669 if (thisValue != null) throw 'incorrect initialization of "thisValue"'; |
| 670 thisValue = true; |
| 671 if (!thisValue) throw 'incorrect value in "thisValue"'; |
| 672 thisValue = false; |
| 673 if (thisValue) throw 'incorrect value in "thisValue"'; |
| 674 |
| 675 if (throwValue != null) throw 'incorrect initialization of "throwValue"'; |
| 676 throwValue = true; |
| 677 if (!throwValue) throw 'incorrect value in "throwValue"'; |
| 678 throwValue = false; |
| 679 if (throwValue) throw 'incorrect value in "throwValue"'; |
| 680 |
| 681 if (trueValue != null) throw 'incorrect initialization of "trueValue"'; |
| 682 trueValue = true; |
| 683 if (!trueValue) throw 'incorrect value in "trueValue"'; |
| 684 trueValue = false; |
| 685 if (trueValue) throw 'incorrect value in "trueValue"'; |
| 686 |
| 687 if (tryValue != null) throw 'incorrect initialization of "tryValue"'; |
| 688 tryValue = true; |
| 689 if (!tryValue) throw 'incorrect value in "tryValue"'; |
| 690 tryValue = false; |
| 691 if (tryValue) throw 'incorrect value in "tryValue"'; |
| 692 |
| 693 if (typeofValue != null) throw 'incorrect initialization of "typeofValue"'; |
| 694 typeofValue = true; |
| 695 if (!typeofValue) throw 'incorrect value in "typeofValue"'; |
| 696 typeofValue = false; |
| 697 if (typeofValue) throw 'incorrect value in "typeofValue"'; |
| 698 |
| 699 if (varValue != null) throw 'incorrect initialization of "varValue"'; |
| 700 varValue = true; |
| 701 if (!varValue) throw 'incorrect value in "varValue"'; |
| 702 varValue = false; |
| 703 if (varValue) throw 'incorrect value in "varValue"'; |
| 704 |
| 705 if (voidValue != null) throw 'incorrect initialization of "voidValue"'; |
| 706 voidValue = true; |
| 707 if (!voidValue) throw 'incorrect value in "voidValue"'; |
| 708 voidValue = false; |
| 709 if (voidValue) throw 'incorrect value in "voidValue"'; |
| 710 |
| 711 if (whileValue != null) throw 'incorrect initialization of "whileValue"'; |
| 712 whileValue = true; |
| 713 if (!whileValue) throw 'incorrect value in "whileValue"'; |
| 714 whileValue = false; |
| 715 if (whileValue) throw 'incorrect value in "whileValue"'; |
| 716 |
| 717 if (withValue != null) throw 'incorrect initialization of "withValue"'; |
| 718 withValue = true; |
| 719 if (!withValue) throw 'incorrect value in "withValue"'; |
| 720 withValue = false; |
| 721 if (withValue) throw 'incorrect value in "withValue"'; |
| 722 |
| 723 if (yieldValue != null) throw 'incorrect initialization of "yieldValue"'; |
| 724 yieldValue = true; |
| 725 if (!yieldValue) throw 'incorrect value in "yieldValue"'; |
| 726 yieldValue = false; |
| 727 if (yieldValue) throw 'incorrect value in "yieldValue"'; |
| 728 |
| 729 } |
| 730 } |
| 731 |
| 732 /// Called once with an instance of NativeClassWithOddNames making it easy |
| 733 /// to inline accessors. |
| 734 testObjectStronglyTyped(object) { |
| 735 if (object.breakValue == null) |
| 736 throw 'incorrect initialization of "breakValue"'; |
| 737 object.breakValue = true; |
| 738 if (!object.breakValue) throw 'incorrect value in "breakValue"'; |
| 739 object.breakValue = false; |
| 740 if (object.breakValue) throw 'incorrect value in "breakValue"'; |
| 741 |
| 742 if (object.caseValue == null) |
| 743 throw 'incorrect initialization of "caseValue"'; |
| 744 object.caseValue = true; |
| 745 if (!object.caseValue) throw 'incorrect value in "caseValue"'; |
| 746 object.caseValue = false; |
| 747 if (object.caseValue) throw 'incorrect value in "caseValue"'; |
| 748 |
| 749 if (object.catchValue == null) |
| 750 throw 'incorrect initialization of "catchValue"'; |
| 751 object.catchValue = true; |
| 752 if (!object.catchValue) throw 'incorrect value in "catchValue"'; |
| 753 object.catchValue = false; |
| 754 if (object.catchValue) throw 'incorrect value in "catchValue"'; |
| 755 |
| 756 if (object.classValue == null) |
| 757 throw 'incorrect initialization of "classValue"'; |
| 758 object.classValue = true; |
| 759 if (!object.classValue) throw 'incorrect value in "classValue"'; |
| 760 object.classValue = false; |
| 761 if (object.classValue) throw 'incorrect value in "classValue"'; |
| 762 |
| 763 if (object.constValue == null) |
| 764 throw 'incorrect initialization of "constValue"'; |
| 765 object.constValue = true; |
| 766 if (!object.constValue) throw 'incorrect value in "constValue"'; |
| 767 object.constValue = false; |
| 768 if (object.constValue) throw 'incorrect value in "constValue"'; |
| 769 |
| 770 if (object.continueValue == null) |
| 771 throw 'incorrect initialization of "continueValue"'; |
| 772 object.continueValue = true; |
| 773 if (!object.continueValue) throw 'incorrect value in "continueValue"'; |
| 774 object.continueValue = false; |
| 775 if (object.continueValue) throw 'incorrect value in "continueValue"'; |
| 776 |
| 777 if (object.debuggerValue == null) |
| 778 throw 'incorrect initialization of "debuggerValue"'; |
| 779 object.debuggerValue = true; |
| 780 if (!object.debuggerValue) throw 'incorrect value in "debuggerValue"'; |
| 781 object.debuggerValue = false; |
| 782 if (object.debuggerValue) throw 'incorrect value in "debuggerValue"'; |
| 783 |
| 784 if (object.defaultValue == null) |
| 785 throw 'incorrect initialization of "defaultValue"'; |
| 786 object.defaultValue = true; |
| 787 if (!object.defaultValue) throw 'incorrect value in "defaultValue"'; |
| 788 object.defaultValue = false; |
| 789 if (object.defaultValue) throw 'incorrect value in "defaultValue"'; |
| 790 |
| 791 if (object.deleteValue == null) |
| 792 throw 'incorrect initialization of "deleteValue"'; |
| 793 object.deleteValue = true; |
| 794 if (!object.deleteValue) throw 'incorrect value in "deleteValue"'; |
| 795 object.deleteValue = false; |
| 796 if (object.deleteValue) throw 'incorrect value in "deleteValue"'; |
| 797 |
| 798 if (object.doValue == null) |
| 799 throw 'incorrect initialization of "doValue"'; |
| 800 object.doValue = true; |
| 801 if (!object.doValue) throw 'incorrect value in "doValue"'; |
| 802 object.doValue = false; |
| 803 if (object.doValue) throw 'incorrect value in "doValue"'; |
| 804 |
| 805 if (object.elseValue == null) |
| 806 throw 'incorrect initialization of "elseValue"'; |
| 807 object.elseValue = true; |
| 808 if (!object.elseValue) throw 'incorrect value in "elseValue"'; |
| 809 object.elseValue = false; |
| 810 if (object.elseValue) throw 'incorrect value in "elseValue"'; |
| 811 |
| 812 if (object.enumValue == null) |
| 813 throw 'incorrect initialization of "enumValue"'; |
| 814 object.enumValue = true; |
| 815 if (!object.enumValue) throw 'incorrect value in "enumValue"'; |
| 816 object.enumValue = false; |
| 817 if (object.enumValue) throw 'incorrect value in "enumValue"'; |
| 818 |
| 819 if (object.exportValue == null) |
| 820 throw 'incorrect initialization of "exportValue"'; |
| 821 object.exportValue = true; |
| 822 if (!object.exportValue) throw 'incorrect value in "exportValue"'; |
| 823 object.exportValue = false; |
| 824 if (object.exportValue) throw 'incorrect value in "exportValue"'; |
| 825 |
| 826 if (object.extendsValue == null) |
| 827 throw 'incorrect initialization of "extendsValue"'; |
| 828 object.extendsValue = true; |
| 829 if (!object.extendsValue) throw 'incorrect value in "extendsValue"'; |
| 830 object.extendsValue = false; |
| 831 if (object.extendsValue) throw 'incorrect value in "extendsValue"'; |
| 832 |
| 833 if (object.falseValue == null) |
| 834 throw 'incorrect initialization of "falseValue"'; |
| 835 object.falseValue = true; |
| 836 if (!object.falseValue) throw 'incorrect value in "falseValue"'; |
| 837 object.falseValue = false; |
| 838 if (object.falseValue) throw 'incorrect value in "falseValue"'; |
| 839 |
| 840 if (object.finallyValue == null) |
| 841 throw 'incorrect initialization of "finallyValue"'; |
| 842 object.finallyValue = true; |
| 843 if (!object.finallyValue) throw 'incorrect value in "finallyValue"'; |
| 844 object.finallyValue = false; |
| 845 if (object.finallyValue) throw 'incorrect value in "finallyValue"'; |
| 846 |
| 847 if (object.forValue == null) |
| 848 throw 'incorrect initialization of "forValue"'; |
| 849 object.forValue = true; |
| 850 if (!object.forValue) throw 'incorrect value in "forValue"'; |
| 851 object.forValue = false; |
| 852 if (object.forValue) throw 'incorrect value in "forValue"'; |
| 853 |
| 854 if (object.functionValue == null) |
| 855 throw 'incorrect initialization of "functionValue"'; |
| 856 object.functionValue = true; |
| 857 if (!object.functionValue) throw 'incorrect value in "functionValue"'; |
| 858 object.functionValue = false; |
| 859 if (object.functionValue) throw 'incorrect value in "functionValue"'; |
| 860 |
| 861 if (object.ifValue == null) |
| 862 throw 'incorrect initialization of "ifValue"'; |
| 863 object.ifValue = true; |
| 864 if (!object.ifValue) throw 'incorrect value in "ifValue"'; |
| 865 object.ifValue = false; |
| 866 if (object.ifValue) throw 'incorrect value in "ifValue"'; |
| 867 |
| 868 if (object.implementsValue == null) |
| 869 throw 'incorrect initialization of "implementsValue"'; |
| 870 object.implementsValue = true; |
| 871 if (!object.implementsValue) throw 'incorrect value in "implementsValue"'; |
| 872 object.implementsValue = false; |
| 873 if (object.implementsValue) throw 'incorrect value in "implementsValue"'; |
| 874 |
| 875 if (object.importValue == null) |
| 876 throw 'incorrect initialization of "importValue"'; |
| 877 object.importValue = true; |
| 878 if (!object.importValue) throw 'incorrect value in "importValue"'; |
| 879 object.importValue = false; |
| 880 if (object.importValue) throw 'incorrect value in "importValue"'; |
| 881 |
| 882 if (object.inValue == null) |
| 883 throw 'incorrect initialization of "inValue"'; |
| 884 object.inValue = true; |
| 885 if (!object.inValue) throw 'incorrect value in "inValue"'; |
| 886 object.inValue = false; |
| 887 if (object.inValue) throw 'incorrect value in "inValue"'; |
| 888 |
| 889 if (object.instanceofValue == null) |
| 890 throw 'incorrect initialization of "instanceofValue"'; |
| 891 object.instanceofValue = true; |
| 892 if (!object.instanceofValue) throw 'incorrect value in "instanceofValue"'; |
| 893 object.instanceofValue = false; |
| 894 if (object.instanceofValue) throw 'incorrect value in "instanceofValue"'; |
| 895 |
| 896 if (object.interfaceValue == null) |
| 897 throw 'incorrect initialization of "interfaceValue"'; |
| 898 object.interfaceValue = true; |
| 899 if (!object.interfaceValue) throw 'incorrect value in "interfaceValue"'; |
| 900 object.interfaceValue = false; |
| 901 if (object.interfaceValue) throw 'incorrect value in "interfaceValue"'; |
| 902 |
| 903 if (object.letValue == null) |
| 904 throw 'incorrect initialization of "letValue"'; |
| 905 object.letValue = true; |
| 906 if (!object.letValue) throw 'incorrect value in "letValue"'; |
| 907 object.letValue = false; |
| 908 if (object.letValue) throw 'incorrect value in "letValue"'; |
| 909 |
| 910 if (object.newValue == null) |
| 911 throw 'incorrect initialization of "newValue"'; |
| 912 object.newValue = true; |
| 913 if (!object.newValue) throw 'incorrect value in "newValue"'; |
| 914 object.newValue = false; |
| 915 if (object.newValue) throw 'incorrect value in "newValue"'; |
| 916 |
| 917 if (object.nullValue == null) |
| 918 throw 'incorrect initialization of "nullValue"'; |
| 919 object.nullValue = true; |
| 920 if (!object.nullValue) throw 'incorrect value in "nullValue"'; |
| 921 object.nullValue = false; |
| 922 if (object.nullValue) throw 'incorrect value in "nullValue"'; |
| 923 |
| 924 if (object.packageValue == null) |
| 925 throw 'incorrect initialization of "packageValue"'; |
| 926 object.packageValue = true; |
| 927 if (!object.packageValue) throw 'incorrect value in "packageValue"'; |
| 928 object.packageValue = false; |
| 929 if (object.packageValue) throw 'incorrect value in "packageValue"'; |
| 930 |
| 931 if (object.privateValue == null) |
| 932 throw 'incorrect initialization of "privateValue"'; |
| 933 object.privateValue = true; |
| 934 if (!object.privateValue) throw 'incorrect value in "privateValue"'; |
| 935 object.privateValue = false; |
| 936 if (object.privateValue) throw 'incorrect value in "privateValue"'; |
| 937 |
| 938 if (object.protectedValue == null) |
| 939 throw 'incorrect initialization of "protectedValue"'; |
| 940 object.protectedValue = true; |
| 941 if (!object.protectedValue) throw 'incorrect value in "protectedValue"'; |
| 942 object.protectedValue = false; |
| 943 if (object.protectedValue) throw 'incorrect value in "protectedValue"'; |
| 944 |
| 945 if (object.publicValue == null) |
| 946 throw 'incorrect initialization of "publicValue"'; |
| 947 object.publicValue = true; |
| 948 if (!object.publicValue) throw 'incorrect value in "publicValue"'; |
| 949 object.publicValue = false; |
| 950 if (object.publicValue) throw 'incorrect value in "publicValue"'; |
| 951 |
| 952 if (object.returnValue == null) |
| 953 throw 'incorrect initialization of "returnValue"'; |
| 954 object.returnValue = true; |
| 955 if (!object.returnValue) throw 'incorrect value in "returnValue"'; |
| 956 object.returnValue = false; |
| 957 if (object.returnValue) throw 'incorrect value in "returnValue"'; |
| 958 |
| 959 if (object.staticValue == null) |
| 960 throw 'incorrect initialization of "staticValue"'; |
| 961 object.staticValue = true; |
| 962 if (!object.staticValue) throw 'incorrect value in "staticValue"'; |
| 963 object.staticValue = false; |
| 964 if (object.staticValue) throw 'incorrect value in "staticValue"'; |
| 965 |
| 966 if (object.superValue == null) |
| 967 throw 'incorrect initialization of "superValue"'; |
| 968 object.superValue = true; |
| 969 if (!object.superValue) throw 'incorrect value in "superValue"'; |
| 970 object.superValue = false; |
| 971 if (object.superValue) throw 'incorrect value in "superValue"'; |
| 972 |
| 973 if (object.switchValue == null) |
| 974 throw 'incorrect initialization of "switchValue"'; |
| 975 object.switchValue = true; |
| 976 if (!object.switchValue) throw 'incorrect value in "switchValue"'; |
| 977 object.switchValue = false; |
| 978 if (object.switchValue) throw 'incorrect value in "switchValue"'; |
| 979 |
| 980 if (object.thisValue == null) |
| 981 throw 'incorrect initialization of "thisValue"'; |
| 982 object.thisValue = true; |
| 983 if (!object.thisValue) throw 'incorrect value in "thisValue"'; |
| 984 object.thisValue = false; |
| 985 if (object.thisValue) throw 'incorrect value in "thisValue"'; |
| 986 |
| 987 if (object.throwValue == null) |
| 988 throw 'incorrect initialization of "throwValue"'; |
| 989 object.throwValue = true; |
| 990 if (!object.throwValue) throw 'incorrect value in "throwValue"'; |
| 991 object.throwValue = false; |
| 992 if (object.throwValue) throw 'incorrect value in "throwValue"'; |
| 993 |
| 994 if (object.trueValue == null) |
| 995 throw 'incorrect initialization of "trueValue"'; |
| 996 object.trueValue = true; |
| 997 if (!object.trueValue) throw 'incorrect value in "trueValue"'; |
| 998 object.trueValue = false; |
| 999 if (object.trueValue) throw 'incorrect value in "trueValue"'; |
| 1000 |
| 1001 if (object.tryValue == null) |
| 1002 throw 'incorrect initialization of "tryValue"'; |
| 1003 object.tryValue = true; |
| 1004 if (!object.tryValue) throw 'incorrect value in "tryValue"'; |
| 1005 object.tryValue = false; |
| 1006 if (object.tryValue) throw 'incorrect value in "tryValue"'; |
| 1007 |
| 1008 if (object.typeofValue == null) |
| 1009 throw 'incorrect initialization of "typeofValue"'; |
| 1010 object.typeofValue = true; |
| 1011 if (!object.typeofValue) throw 'incorrect value in "typeofValue"'; |
| 1012 object.typeofValue = false; |
| 1013 if (object.typeofValue) throw 'incorrect value in "typeofValue"'; |
| 1014 |
| 1015 if (object.varValue == null) |
| 1016 throw 'incorrect initialization of "varValue"'; |
| 1017 object.varValue = true; |
| 1018 if (!object.varValue) throw 'incorrect value in "varValue"'; |
| 1019 object.varValue = false; |
| 1020 if (object.varValue) throw 'incorrect value in "varValue"'; |
| 1021 |
| 1022 if (object.voidValue == null) |
| 1023 throw 'incorrect initialization of "voidValue"'; |
| 1024 object.voidValue = true; |
| 1025 if (!object.voidValue) throw 'incorrect value in "voidValue"'; |
| 1026 object.voidValue = false; |
| 1027 if (object.voidValue) throw 'incorrect value in "voidValue"'; |
| 1028 |
| 1029 if (object.whileValue == null) |
| 1030 throw 'incorrect initialization of "whileValue"'; |
| 1031 object.whileValue = true; |
| 1032 if (!object.whileValue) throw 'incorrect value in "whileValue"'; |
| 1033 object.whileValue = false; |
| 1034 if (object.whileValue) throw 'incorrect value in "whileValue"'; |
| 1035 |
| 1036 if (object.withValue == null) |
| 1037 throw 'incorrect initialization of "withValue"'; |
| 1038 object.withValue = true; |
| 1039 if (!object.withValue) throw 'incorrect value in "withValue"'; |
| 1040 object.withValue = false; |
| 1041 if (object.withValue) throw 'incorrect value in "withValue"'; |
| 1042 |
| 1043 if (object.yieldValue == null) |
| 1044 throw 'incorrect initialization of "yieldValue"'; |
| 1045 object.yieldValue = true; |
| 1046 if (!object.yieldValue) throw 'incorrect value in "yieldValue"'; |
| 1047 object.yieldValue = false; |
| 1048 if (object.yieldValue) throw 'incorrect value in "yieldValue"'; |
| 1049 } |
| 1050 |
| 1051 /// Called multiple times with arguments that are hard to track in type |
| 1052 /// inference making it hard to inline accessors. |
| 1053 testObjectWeaklyTyped(object) { |
| 1054 object = object[0]; |
| 1055 if (object == 'fisk') return; |
| 1056 if (object.breakValue == null) |
| 1057 throw 'incorrect initialization of "breakValue"'; |
| 1058 object.breakValue = true; |
| 1059 if (!object.breakValue) throw 'incorrect value in "breakValue"'; |
| 1060 object.breakValue = false; |
| 1061 if (object.breakValue) throw 'incorrect value in "breakValue"'; |
| 1062 |
| 1063 if (object.caseValue == null) |
| 1064 throw 'incorrect initialization of "caseValue"'; |
| 1065 object.caseValue = true; |
| 1066 if (!object.caseValue) throw 'incorrect value in "caseValue"'; |
| 1067 object.caseValue = false; |
| 1068 if (object.caseValue) throw 'incorrect value in "caseValue"'; |
| 1069 |
| 1070 if (object.catchValue == null) |
| 1071 throw 'incorrect initialization of "catchValue"'; |
| 1072 object.catchValue = true; |
| 1073 if (!object.catchValue) throw 'incorrect value in "catchValue"'; |
| 1074 object.catchValue = false; |
| 1075 if (object.catchValue) throw 'incorrect value in "catchValue"'; |
| 1076 |
| 1077 if (object.classValue == null) |
| 1078 throw 'incorrect initialization of "classValue"'; |
| 1079 object.classValue = true; |
| 1080 if (!object.classValue) throw 'incorrect value in "classValue"'; |
| 1081 object.classValue = false; |
| 1082 if (object.classValue) throw 'incorrect value in "classValue"'; |
| 1083 |
| 1084 if (object.constValue == null) |
| 1085 throw 'incorrect initialization of "constValue"'; |
| 1086 object.constValue = true; |
| 1087 if (!object.constValue) throw 'incorrect value in "constValue"'; |
| 1088 object.constValue = false; |
| 1089 if (object.constValue) throw 'incorrect value in "constValue"'; |
| 1090 |
| 1091 if (object.continueValue == null) |
| 1092 throw 'incorrect initialization of "continueValue"'; |
| 1093 object.continueValue = true; |
| 1094 if (!object.continueValue) throw 'incorrect value in "continueValue"'; |
| 1095 object.continueValue = false; |
| 1096 if (object.continueValue) throw 'incorrect value in "continueValue"'; |
| 1097 |
| 1098 if (object.debuggerValue == null) |
| 1099 throw 'incorrect initialization of "debuggerValue"'; |
| 1100 object.debuggerValue = true; |
| 1101 if (!object.debuggerValue) throw 'incorrect value in "debuggerValue"'; |
| 1102 object.debuggerValue = false; |
| 1103 if (object.debuggerValue) throw 'incorrect value in "debuggerValue"'; |
| 1104 |
| 1105 if (object.defaultValue == null) |
| 1106 throw 'incorrect initialization of "defaultValue"'; |
| 1107 object.defaultValue = true; |
| 1108 if (!object.defaultValue) throw 'incorrect value in "defaultValue"'; |
| 1109 object.defaultValue = false; |
| 1110 if (object.defaultValue) throw 'incorrect value in "defaultValue"'; |
| 1111 |
| 1112 if (object.deleteValue == null) |
| 1113 throw 'incorrect initialization of "deleteValue"'; |
| 1114 object.deleteValue = true; |
| 1115 if (!object.deleteValue) throw 'incorrect value in "deleteValue"'; |
| 1116 object.deleteValue = false; |
| 1117 if (object.deleteValue) throw 'incorrect value in "deleteValue"'; |
| 1118 |
| 1119 if (object.doValue == null) |
| 1120 throw 'incorrect initialization of "doValue"'; |
| 1121 object.doValue = true; |
| 1122 if (!object.doValue) throw 'incorrect value in "doValue"'; |
| 1123 object.doValue = false; |
| 1124 if (object.doValue) throw 'incorrect value in "doValue"'; |
| 1125 |
| 1126 if (object.elseValue == null) |
| 1127 throw 'incorrect initialization of "elseValue"'; |
| 1128 object.elseValue = true; |
| 1129 if (!object.elseValue) throw 'incorrect value in "elseValue"'; |
| 1130 object.elseValue = false; |
| 1131 if (object.elseValue) throw 'incorrect value in "elseValue"'; |
| 1132 |
| 1133 if (object.enumValue == null) |
| 1134 throw 'incorrect initialization of "enumValue"'; |
| 1135 object.enumValue = true; |
| 1136 if (!object.enumValue) throw 'incorrect value in "enumValue"'; |
| 1137 object.enumValue = false; |
| 1138 if (object.enumValue) throw 'incorrect value in "enumValue"'; |
| 1139 |
| 1140 if (object.exportValue == null) |
| 1141 throw 'incorrect initialization of "exportValue"'; |
| 1142 object.exportValue = true; |
| 1143 if (!object.exportValue) throw 'incorrect value in "exportValue"'; |
| 1144 object.exportValue = false; |
| 1145 if (object.exportValue) throw 'incorrect value in "exportValue"'; |
| 1146 |
| 1147 if (object.extendsValue == null) |
| 1148 throw 'incorrect initialization of "extendsValue"'; |
| 1149 object.extendsValue = true; |
| 1150 if (!object.extendsValue) throw 'incorrect value in "extendsValue"'; |
| 1151 object.extendsValue = false; |
| 1152 if (object.extendsValue) throw 'incorrect value in "extendsValue"'; |
| 1153 |
| 1154 if (object.falseValue == null) |
| 1155 throw 'incorrect initialization of "falseValue"'; |
| 1156 object.falseValue = true; |
| 1157 if (!object.falseValue) throw 'incorrect value in "falseValue"'; |
| 1158 object.falseValue = false; |
| 1159 if (object.falseValue) throw 'incorrect value in "falseValue"'; |
| 1160 |
| 1161 if (object.finallyValue == null) |
| 1162 throw 'incorrect initialization of "finallyValue"'; |
| 1163 object.finallyValue = true; |
| 1164 if (!object.finallyValue) throw 'incorrect value in "finallyValue"'; |
| 1165 object.finallyValue = false; |
| 1166 if (object.finallyValue) throw 'incorrect value in "finallyValue"'; |
| 1167 |
| 1168 if (object.forValue == null) |
| 1169 throw 'incorrect initialization of "forValue"'; |
| 1170 object.forValue = true; |
| 1171 if (!object.forValue) throw 'incorrect value in "forValue"'; |
| 1172 object.forValue = false; |
| 1173 if (object.forValue) throw 'incorrect value in "forValue"'; |
| 1174 |
| 1175 if (object.functionValue == null) |
| 1176 throw 'incorrect initialization of "functionValue"'; |
| 1177 object.functionValue = true; |
| 1178 if (!object.functionValue) throw 'incorrect value in "functionValue"'; |
| 1179 object.functionValue = false; |
| 1180 if (object.functionValue) throw 'incorrect value in "functionValue"'; |
| 1181 |
| 1182 if (object.ifValue == null) |
| 1183 throw 'incorrect initialization of "ifValue"'; |
| 1184 object.ifValue = true; |
| 1185 if (!object.ifValue) throw 'incorrect value in "ifValue"'; |
| 1186 object.ifValue = false; |
| 1187 if (object.ifValue) throw 'incorrect value in "ifValue"'; |
| 1188 |
| 1189 if (object.implementsValue == null) |
| 1190 throw 'incorrect initialization of "implementsValue"'; |
| 1191 object.implementsValue = true; |
| 1192 if (!object.implementsValue) throw 'incorrect value in "implementsValue"'; |
| 1193 object.implementsValue = false; |
| 1194 if (object.implementsValue) throw 'incorrect value in "implementsValue"'; |
| 1195 |
| 1196 if (object.importValue == null) |
| 1197 throw 'incorrect initialization of "importValue"'; |
| 1198 object.importValue = true; |
| 1199 if (!object.importValue) throw 'incorrect value in "importValue"'; |
| 1200 object.importValue = false; |
| 1201 if (object.importValue) throw 'incorrect value in "importValue"'; |
| 1202 |
| 1203 if (object.inValue == null) |
| 1204 throw 'incorrect initialization of "inValue"'; |
| 1205 object.inValue = true; |
| 1206 if (!object.inValue) throw 'incorrect value in "inValue"'; |
| 1207 object.inValue = false; |
| 1208 if (object.inValue) throw 'incorrect value in "inValue"'; |
| 1209 |
| 1210 if (object.instanceofValue == null) |
| 1211 throw 'incorrect initialization of "instanceofValue"'; |
| 1212 object.instanceofValue = true; |
| 1213 if (!object.instanceofValue) throw 'incorrect value in "instanceofValue"'; |
| 1214 object.instanceofValue = false; |
| 1215 if (object.instanceofValue) throw 'incorrect value in "instanceofValue"'; |
| 1216 |
| 1217 if (object.interfaceValue == null) |
| 1218 throw 'incorrect initialization of "interfaceValue"'; |
| 1219 object.interfaceValue = true; |
| 1220 if (!object.interfaceValue) throw 'incorrect value in "interfaceValue"'; |
| 1221 object.interfaceValue = false; |
| 1222 if (object.interfaceValue) throw 'incorrect value in "interfaceValue"'; |
| 1223 |
| 1224 if (object.letValue == null) |
| 1225 throw 'incorrect initialization of "letValue"'; |
| 1226 object.letValue = true; |
| 1227 if (!object.letValue) throw 'incorrect value in "letValue"'; |
| 1228 object.letValue = false; |
| 1229 if (object.letValue) throw 'incorrect value in "letValue"'; |
| 1230 |
| 1231 if (object.newValue == null) |
| 1232 throw 'incorrect initialization of "newValue"'; |
| 1233 object.newValue = true; |
| 1234 if (!object.newValue) throw 'incorrect value in "newValue"'; |
| 1235 object.newValue = false; |
| 1236 if (object.newValue) throw 'incorrect value in "newValue"'; |
| 1237 |
| 1238 if (object.nullValue == null) |
| 1239 throw 'incorrect initialization of "nullValue"'; |
| 1240 object.nullValue = true; |
| 1241 if (!object.nullValue) throw 'incorrect value in "nullValue"'; |
| 1242 object.nullValue = false; |
| 1243 if (object.nullValue) throw 'incorrect value in "nullValue"'; |
| 1244 |
| 1245 if (object.packageValue == null) |
| 1246 throw 'incorrect initialization of "packageValue"'; |
| 1247 object.packageValue = true; |
| 1248 if (!object.packageValue) throw 'incorrect value in "packageValue"'; |
| 1249 object.packageValue = false; |
| 1250 if (object.packageValue) throw 'incorrect value in "packageValue"'; |
| 1251 |
| 1252 if (object.privateValue == null) |
| 1253 throw 'incorrect initialization of "privateValue"'; |
| 1254 object.privateValue = true; |
| 1255 if (!object.privateValue) throw 'incorrect value in "privateValue"'; |
| 1256 object.privateValue = false; |
| 1257 if (object.privateValue) throw 'incorrect value in "privateValue"'; |
| 1258 |
| 1259 if (object.protectedValue == null) |
| 1260 throw 'incorrect initialization of "protectedValue"'; |
| 1261 object.protectedValue = true; |
| 1262 if (!object.protectedValue) throw 'incorrect value in "protectedValue"'; |
| 1263 object.protectedValue = false; |
| 1264 if (object.protectedValue) throw 'incorrect value in "protectedValue"'; |
| 1265 |
| 1266 if (object.publicValue == null) |
| 1267 throw 'incorrect initialization of "publicValue"'; |
| 1268 object.publicValue = true; |
| 1269 if (!object.publicValue) throw 'incorrect value in "publicValue"'; |
| 1270 object.publicValue = false; |
| 1271 if (object.publicValue) throw 'incorrect value in "publicValue"'; |
| 1272 |
| 1273 if (object.returnValue == null) |
| 1274 throw 'incorrect initialization of "returnValue"'; |
| 1275 object.returnValue = true; |
| 1276 if (!object.returnValue) throw 'incorrect value in "returnValue"'; |
| 1277 object.returnValue = false; |
| 1278 if (object.returnValue) throw 'incorrect value in "returnValue"'; |
| 1279 |
| 1280 if (object.staticValue == null) |
| 1281 throw 'incorrect initialization of "staticValue"'; |
| 1282 object.staticValue = true; |
| 1283 if (!object.staticValue) throw 'incorrect value in "staticValue"'; |
| 1284 object.staticValue = false; |
| 1285 if (object.staticValue) throw 'incorrect value in "staticValue"'; |
| 1286 |
| 1287 if (object.superValue == null) |
| 1288 throw 'incorrect initialization of "superValue"'; |
| 1289 object.superValue = true; |
| 1290 if (!object.superValue) throw 'incorrect value in "superValue"'; |
| 1291 object.superValue = false; |
| 1292 if (object.superValue) throw 'incorrect value in "superValue"'; |
| 1293 |
| 1294 if (object.switchValue == null) |
| 1295 throw 'incorrect initialization of "switchValue"'; |
| 1296 object.switchValue = true; |
| 1297 if (!object.switchValue) throw 'incorrect value in "switchValue"'; |
| 1298 object.switchValue = false; |
| 1299 if (object.switchValue) throw 'incorrect value in "switchValue"'; |
| 1300 |
| 1301 if (object.thisValue == null) |
| 1302 throw 'incorrect initialization of "thisValue"'; |
| 1303 object.thisValue = true; |
| 1304 if (!object.thisValue) throw 'incorrect value in "thisValue"'; |
| 1305 object.thisValue = false; |
| 1306 if (object.thisValue) throw 'incorrect value in "thisValue"'; |
| 1307 |
| 1308 if (object.throwValue == null) |
| 1309 throw 'incorrect initialization of "throwValue"'; |
| 1310 object.throwValue = true; |
| 1311 if (!object.throwValue) throw 'incorrect value in "throwValue"'; |
| 1312 object.throwValue = false; |
| 1313 if (object.throwValue) throw 'incorrect value in "throwValue"'; |
| 1314 |
| 1315 if (object.trueValue == null) |
| 1316 throw 'incorrect initialization of "trueValue"'; |
| 1317 object.trueValue = true; |
| 1318 if (!object.trueValue) throw 'incorrect value in "trueValue"'; |
| 1319 object.trueValue = false; |
| 1320 if (object.trueValue) throw 'incorrect value in "trueValue"'; |
| 1321 |
| 1322 if (object.tryValue == null) |
| 1323 throw 'incorrect initialization of "tryValue"'; |
| 1324 object.tryValue = true; |
| 1325 if (!object.tryValue) throw 'incorrect value in "tryValue"'; |
| 1326 object.tryValue = false; |
| 1327 if (object.tryValue) throw 'incorrect value in "tryValue"'; |
| 1328 |
| 1329 if (object.typeofValue == null) |
| 1330 throw 'incorrect initialization of "typeofValue"'; |
| 1331 object.typeofValue = true; |
| 1332 if (!object.typeofValue) throw 'incorrect value in "typeofValue"'; |
| 1333 object.typeofValue = false; |
| 1334 if (object.typeofValue) throw 'incorrect value in "typeofValue"'; |
| 1335 |
| 1336 if (object.varValue == null) |
| 1337 throw 'incorrect initialization of "varValue"'; |
| 1338 object.varValue = true; |
| 1339 if (!object.varValue) throw 'incorrect value in "varValue"'; |
| 1340 object.varValue = false; |
| 1341 if (object.varValue) throw 'incorrect value in "varValue"'; |
| 1342 |
| 1343 if (object.voidValue == null) |
| 1344 throw 'incorrect initialization of "voidValue"'; |
| 1345 object.voidValue = true; |
| 1346 if (!object.voidValue) throw 'incorrect value in "voidValue"'; |
| 1347 object.voidValue = false; |
| 1348 if (object.voidValue) throw 'incorrect value in "voidValue"'; |
| 1349 |
| 1350 if (object.whileValue == null) |
| 1351 throw 'incorrect initialization of "whileValue"'; |
| 1352 object.whileValue = true; |
| 1353 if (!object.whileValue) throw 'incorrect value in "whileValue"'; |
| 1354 object.whileValue = false; |
| 1355 if (object.whileValue) throw 'incorrect value in "whileValue"'; |
| 1356 |
| 1357 if (object.withValue == null) |
| 1358 throw 'incorrect initialization of "withValue"'; |
| 1359 object.withValue = true; |
| 1360 if (!object.withValue) throw 'incorrect value in "withValue"'; |
| 1361 object.withValue = false; |
| 1362 if (object.withValue) throw 'incorrect value in "withValue"'; |
| 1363 |
| 1364 if (object.yieldValue == null) |
| 1365 throw 'incorrect initialization of "yieldValue"'; |
| 1366 object.yieldValue = true; |
| 1367 if (!object.yieldValue) throw 'incorrect value in "yieldValue"'; |
| 1368 object.yieldValue = false; |
| 1369 if (object.yieldValue) throw 'incorrect value in "yieldValue"'; |
| 1370 } |
| 1371 |
| 1372 makeNativeClassWithOddNames() native; |
| 1373 |
| 1374 setup() native """ |
| 1375 function NativeClassWithOddNames() {} |
| 1376 makeNativeClassWithOddNames = function() { return new NativeClassWithOddNames; } |
| 1377 """; |
| 1378 |
| 1379 main() { |
| 1380 setup(); |
| 1381 var object = new NativeClassWithOddNames(); |
| 1382 object.testMyFields(); |
| 1383 testObjectStronglyTyped(object); |
| 1384 testObjectWeaklyTyped([object]); |
| 1385 testObjectWeaklyTyped(['fisk']); |
| 1386 testObjectWeaklyTyped([new ClassWithOddNames()..testMyFields()]); |
| 1387 } |
| OLD | NEW |