1745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// Copyright 2009 the V8 project authors. All rights reserved. 2745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// Redistribution and use in source and binary forms, with or without 3745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// modification, are permitted provided that the following conditions are 4745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// met: 5745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// 6745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// * Redistributions of source code must retain the above copyright 7745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// notice, this list of conditions and the following disclaimer. 8745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// * Redistributions in binary form must reproduce the above 9745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// copyright notice, this list of conditions and the following 10745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// disclaimer in the documentation and/or other materials provided 11745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// with the distribution. 12745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// * Neither the name of Google Inc. nor the names of its 13745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// contributors may be used to endorse or promote products derived 14745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// from this software without specific prior written permission. 15745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// 16745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org 2865dad4b091d2925543c6326db635d0f7cf9e1edcager@chromium.org// Should not crash or raise an exception. 29745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org 30745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.orgfunction test(value) { 31745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org if (typeof(value) == 'boolean') value = value + ''; 32745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org if (typeof(value) == 'number') value = value + ''; 33745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org} 34745311e03953582b6d8824ec00a7d6325da30c44ager@chromium.org 3565dad4b091d2925543c6326db635d0f7cf9e1edcager@chromium.orgassertDoesNotThrow('test(0)'); 36