Skip to content

Commit

Permalink
Merge pull request #242 from dart-lang/async-returns-future
Browse files Browse the repository at this point in the history
add async examples for fake package
  • Loading branch information
sethladd committed Mar 1, 2015
2 parents a3c2f55 + 308cd96 commit ed6f5b8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/fake_package/lib/fake.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
/// [pkg]: http://example.org
library fake;

import 'dart:async';

import 'example.dart';

/// Useful for annotations.
Expand Down Expand Up @@ -200,4 +202,10 @@ void onlyPositionalWithNoDefaultNoType([anything]) {}
void soIntense(anything, {bool flag: true, int value}) { }

/// [A] comes from another library.
void paramFromAnotherLib(Apple thing) {}
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;

0 comments on commit ed6f5b8

Please sign in to comment.