mirror of
https://github.com/dart-lang/sdk
synced 2024-09-19 23:31:42 +00:00
87ff74f2d3
type argument starting with 'void' (fixes #31279). Add regression test. Change-Id: I590e6ce0e7e915098cb24e91db9c1c8549606208 Reviewed-on: https://dart-review.googlesource.com/24624 Reviewed-by: Siva Annamalai <asiva@google.com> Commit-Queue: Régis Crelier <regis@google.com>
23 lines
680 B
Dart
23 lines
680 B
Dart
// Copyright (c) 2017, 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.
|
|
|
|
abstract class Base {
|
|
void update(void Function(Iterable) updates);
|
|
void update2(void updates(Iterable iterable));
|
|
}
|
|
|
|
class CovariantParsingIssue implements Base {
|
|
void update(covariant void Function(List) updates) {}
|
|
void update2(covariant void updates(List list)) {}
|
|
}
|
|
|
|
void VoidParsingIssue() {
|
|
List<void Function(int)> functions = [(int i) => print(i + 1)];
|
|
functions[0](42);
|
|
}
|
|
|
|
void main() {
|
|
new CovariantParsingIssue();
|
|
VoidParsingIssue();
|
|
} |