michael@0: // Any copyright is dedicated to the Public Domain. michael@0: // http://creativecommons.org/licenses/publicdomain/ michael@0: michael@0: //----------------------------------------------------------------------------- michael@0: var BUGNUMBER = 843004; michael@0: var summary = michael@0: "Don't emit a strict warning for the undefined-property detection pattern in self-hosted code"; michael@0: michael@0: print(BUGNUMBER + ": " + summary); michael@0: michael@0: /************** michael@0: * BEGIN TEST * michael@0: **************/ michael@0: michael@0: options("strict", "werror"); michael@0: michael@0: // Don't strict-warn (and throw, because of strict) when self-hosted code uses michael@0: // detecting-safe undefined-property accesses (|options.weekday !== undefined| michael@0: // and similar in ToDateTimeOptions, to be precise). michael@0: new Date().toLocaleString("en-US", {}); michael@0: michael@0: // If we get here, the test passed. michael@0: michael@0: if (typeof reportCompare === "function") michael@0: reportCompare(true, true); michael@0: michael@0: print("Tests complete");