Files
sdk/pkg/front_end/testcases/bug33196.dart
T
Kevin Millikin 51fa5c1662 Correctly transform async functions with FutureOr return types
The async transformer did not allocate a completer with the correct
type in the case for async functions with a FutureOr return type.

Fixes https://github.com/dart-lang/sdk/issues/33196

Change-Id: I72654f24576295e38e8d79dff30aae5c90cb2564
Reviewed-on: https://dart-review.googlesource.com/56488
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-05-24 10:54:03 +00:00

15 lines
373 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';
main() {
var result = returnsString();
print(result.runtimeType);
}
FutureOr<String> returnsString() async {
return "oh no";
}