-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ingress Completed: Reply: 0x4449444c016c01b3c4b1f204680100010a00000000000000000101 | ||
ingress Completed: Reply: 0x4449444c0000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
actor { | ||
|
||
func foo(next : () -> async ()) : async () { | ||
await (with cycles = 3000) next() | ||
}; | ||
|
||
func bar(next : () -> async ()) : async () = async { | ||
await (with cycles = 4000) next() | ||
}; | ||
|
||
public func oneshot() { | ||
}; | ||
|
||
public func test(): async () { | ||
let message = "Hi!"; | ||
|
||
func closA() : async Nat { | ||
message.size() | ||
}; | ||
|
||
func closB() : async Nat = async { | ||
message.size() | ||
}; | ||
/* | ||
// this is ruled out | ||
func closC() : async Nat = | ||
if (1 == 2) async { | ||
message.size() | ||
} else async { | ||
message.size() + 1 | ||
}; | ||
*/ | ||
assert 42 == 42; | ||
assert 3 == (await (with cycles = 101) closA()); | ||
assert 3 == (await (with cycles = 102) closB()); | ||
|
||
await (with yeah = 8; timeout = 55; cycles = 1000) | ||
foo(func() : async () = async { assert message == "Hi!" }); | ||
await (with cycles = 5000) | ||
bar(func() : async () = async { assert message == "Hi!" }); | ||
}; | ||
|
||
|
||
public func test2() : async () { | ||
await (with cycles = 1042) async { } | ||
|
||
} | ||
} |