dart-sdk/tests/language/generic_sends_test.dart
Régis Crelier 6504f342ab [VM] Remove obsolete flags.
--generic_method_syntax
--assert_initializer
--warn_super
--initializing_formal_access

Change-Id: Id2e9f15b1dfecb933df97fb954618ce122cb3e4b
Reviewed-on: https://dart-review.googlesource.com/15643
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2017-10-20 18:13:00 +00:00

26 lines
737 B
Dart

// Copyright (c) 2016, 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.
/// Dart test verifying that the parser can handle certain cases where
/// grammar ambiguity is resolved in favor of generic sends, not
/// relational expressions.
library generic_sends_test;
f(arg1, [arg2]) => null;
g<X, Y>(arg) => null;
main() {
// Generic invocations.
f(g<int, String>(3));
f(g<int, List<String>>(3));
f(g<int, String>(3), 4);
f(g<int, List<String>>(3), 4);
// Relational expressions.
int a = 0, b = 1, c = 2, d = 3;
f(a < b, c > 3);
f(a < b, c >> 3);
f(a < b, c < d >> 3);
}