0220393797
Binary operators were always replaced with string concatenation if both operands were strings. BUG= R=floitsch@google.com Review URL: https://codereview.chromium.org//1210403008.
27 lines
757 B
Dart
27 lines
757 B
Dart
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
import 'package:expect/expect.dart';
|
|
|
|
main() {
|
|
var x = "x";
|
|
var y = "y";
|
|
Expect.throws(() => x < y);
|
|
Expect.throws(() => x <= y);
|
|
Expect.throws(() => x > y);
|
|
Expect.throws(() => x >= y);
|
|
Expect.throws(() => x - y);
|
|
Expect.throws(() => x * y);
|
|
Expect.throws(() => x / y);
|
|
Expect.throws(() => x ~/ y);
|
|
Expect.throws(() => x % y);
|
|
Expect.throws(() => x >> y);
|
|
Expect.throws(() => x << y);
|
|
Expect.throws(() => x & y);
|
|
Expect.throws(() => x | y);
|
|
Expect.throws(() => x ^ y);
|
|
Expect.throws(() => -x);
|
|
Expect.throws(() => ~x);
|
|
}
|