cb70de8afa
Fixes https://github.com/flutter/flutter/issues/19612 Change-Id: I5cf45b7243e4c2b50bb29f8b0f3dafc55a1f1838 Reviewed-on: https://dart-review.googlesource.com/67040 Commit-Queue: Alexander Markov <alexmarkov@google.com> Reviewed-by: Aart Bik <ajcbik@google.com> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
27 lines
680 B
Dart
27 lines
680 B
Dart
// Copyright (c) 2018, 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.
|
|
|
|
// Regression test for https://github.com/flutter/flutter/issues/19612.
|
|
// This test verifies that negated condition is correctly handled by the
|
|
// AOT compiler.
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
class X {
|
|
final int maxLines;
|
|
X([this.maxLines]);
|
|
|
|
bool get isMultiline => maxLines != 1;
|
|
}
|
|
|
|
X x1 = new X(1);
|
|
X x2 = new X(42);
|
|
X x3 = new X();
|
|
|
|
main() {
|
|
Expect.isFalse(x1.isMultiline);
|
|
Expect.isTrue(x2.isMultiline);
|
|
Expect.isTrue(x3.isMultiline);
|
|
}
|