Home | History | Annotate | Download | only in compiler
      1 // Copyright 2015 the V8 project authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 function dateL() {
      6   var date = new Date();
      7   return (date + true) == date.toString() + true;
      8 }
      9 
     10 function dateR() {
     11   var date = new Date();
     12   return (true + date) == true + date.toString();
     13 }
     14 
     15 function strL() {
     16   return (new String(1) + true) == "1true";
     17 }
     18 
     19 function strR() {
     20   return (true + new String(1)) == "true1";
     21 }
     22 
     23 assertTrue(dateL());
     24 assertTrue(dateR());
     25 assertTrue(strL());
     26 assertTrue(strR());
     27