mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 04:27:17 +00:00
8de8a1c226
They are all errors now. Change-Id: If48d38e38e845fd5b5a950dd5514bf1cbbce03d8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155880 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
45 lines
1.1 KiB
Dart
45 lines
1.1 KiB
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.
|
|
|
|
// Test top level field.
|
|
dynamic<int> x1 = 42;
|
|
// [error line 6, column 1, length 12]
|
|
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
|
|
// [cfe] Expected 0 type arguments.
|
|
|
|
class Foo {
|
|
// Test class member.
|
|
dynamic<int> x2 = 42;
|
|
// [error line 13, column 3, length 12]
|
|
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
|
|
// [cfe] Expected 0 type arguments.
|
|
|
|
Foo() {
|
|
print(x2);
|
|
}
|
|
}
|
|
|
|
main() {
|
|
print(x1);
|
|
|
|
new Foo();
|
|
|
|
// Test local variable.
|
|
dynamic<int> x3 = 42;
|
|
// [error line 29, column 3, length 12]
|
|
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
|
|
// [cfe] Expected 0 type arguments.
|
|
print(x3);
|
|
|
|
foo(42);
|
|
}
|
|
|
|
// Test parameter.
|
|
void foo(dynamic<int> x4) {
|
|
// [error line 39, column 10, length 12]
|
|
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
|
|
// [cfe] Expected 0 type arguments.
|
|
print(x4);
|
|
}
|