| Index: tests/compiler/dart2js/cpa_inference_test.dart
|
| diff --git a/tests/compiler/dart2js/cpa_inference_test.dart b/tests/compiler/dart2js/cpa_inference_test.dart
|
| index d6e1a83fcbfad50bc177bd97b05ae5c2a1c24452..7d85b9a10230e30a1b48ed61936e7ff76360326b 100644
|
| --- a/tests/compiler/dart2js/cpa_inference_test.dart
|
| +++ b/tests/compiler/dart2js/cpa_inference_test.dart
|
| @@ -887,6 +887,21 @@ testBooleanOperators() {
|
| }
|
| }
|
|
|
| +testBooleanOperatorsShortCirtcuit() {
|
| + String source(op) {
|
| + return """
|
| + main() {
|
| + var x = null;
|
| + "foo" $op (x = 42);
|
| + x;
|
| + }""";
|
| + }
|
| + for (String op in ['&&', '||']) {
|
| + AnalysisResult result = analyze(source(op));
|
| + result.checkNodeHasType('x', [result.nullType, result.int]);
|
| + }
|
| +}
|
| +
|
| testOperators() {
|
| final String source = r"""
|
| class A {
|
| @@ -1553,6 +1568,7 @@ void main() {
|
| // testNoReturn(); // right now we infer the empty type instead of null
|
| testArithmeticOperators();
|
| testBooleanOperators();
|
| + testBooleanOperatorsShortCirtcuit();
|
| testOperators();
|
| testCompoundOperators1();
|
| testCompoundOperators2();
|
|
|