dart-sdk/tests/language_2/invalid_returns/sync_invalid_return_25_test.dart
Leaf Petersen 1a832455e6 Triage language tests for void
Change-Id: I4fc4bc583f6fe25a0a083efc6b9cda5ef9ae5ceb
Reviewed-on: https://dart-review.googlesource.com/66521
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2018-08-03 23:21:23 +00:00

19 lines
460 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.
import 'dart:async';
/*
* `return exp;` where `exp` has static type `S` is an error if `S` is not
assignable to `T`.
*/
Future<int> v = null;
FutureOr<String> test() {
return /*@compile-error=unspecified*/ v;
}
void main() {
test();
}