From 308cd960e5570c66d7751b31f7d6d2a124860f65 Mon Sep 17 00:00:00 2001 From: Seth Ladd Date: Sun, 1 Mar 2015 13:12:30 -0800 Subject: [PATCH] add async examples for fake package --- test/fake_package/lib/fake.dart | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/fake_package/lib/fake.dart b/test/fake_package/lib/fake.dart index a4b41b162d..f7f38c10d8 100644 --- a/test/fake_package/lib/fake.dart +++ b/test/fake_package/lib/fake.dart @@ -14,6 +14,8 @@ /// [pkg]: http://example.org library fake; +import 'dart:async'; + import 'example.dart'; /// Useful for annotations. @@ -200,4 +202,10 @@ void onlyPositionalWithNoDefaultNoType([anything]) {} void soIntense(anything, {bool flag: true, int value}) { } /// [A] comes from another library. -void paramFromAnotherLib(Apple thing) {} \ No newline at end of file +void paramFromAnotherLib(Apple thing) {} + +/// An async function. It should look like I return a Future. +thisIsAsync() async => 42; + +/// Explicitly returns a Future and is marked async. +Future thisIsAlsoAsync() async => 43; \ No newline at end of file