-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
7 changed files
with
35 additions
and
48 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 |
---|---|---|
@@ -1,39 +1,8 @@ | ||
aqua A | ||
aqua Main | ||
|
||
export streamTry, streamFor | ||
import someFunc from "import.aqua" | ||
|
||
service FailureSrv("failure"): | ||
fail(msg: string) | ||
export someFunc | ||
|
||
func streamTry() -> i8: | ||
on HOST_PEER_ID: | ||
try: | ||
stream: *i8 | ||
anotherStream = stream | ||
stream <<- 1 | ||
anotherStream <<- 1 | ||
FailureSrv.fail("try") | ||
catch e: | ||
stream = *[88,88,88] | ||
stream <<- 2 | ||
FailureSrv.fail("catch") | ||
otherwise: | ||
stream: *i8 | ||
stream <<- 3 | ||
|
||
stream: *i8 | ||
stream <<- 4 | ||
|
||
<- stream! | ||
|
||
service StreamService("test-service"): | ||
store(numbers: []u32, n: u32) | ||
|
||
func callService(stream: *u32, n: u32): | ||
stream <<- 1 | ||
StreamService.store(stream, n) | ||
|
||
func streamFor(): | ||
arr = [1,2,3,4,5] | ||
for a <- arr: | ||
callService(*[], a) | ||
func a() -> string: | ||
<- "srrt" |
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
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,4 @@ | ||
aqua Import declares someFunc | ||
|
||
func someFunc() -> string: | ||
<- "some func" |
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,3 @@ | ||
aqua Redeclare declares someFunc | ||
|
||
import someFunc from "import.aqua" |
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,5 @@ | ||
aqua UseDeclare declares someFunc | ||
|
||
import someFunc from "redeclare.aqua" | ||
|
||
export someFunc |
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
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