-
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.
- Loading branch information
Showing
51 changed files
with
1,134 additions
and
436 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,9 +1,50 @@ | ||
module Import3 declares * | ||
aqua Main | ||
|
||
export foo_bar | ||
use DECLARE_CONST, decl_bar from "declare.aqua" as Declare | ||
|
||
use "export.aqua" | ||
export handleAb | ||
|
||
func foo_bar() -> string, string: | ||
z <- FooBars.foo() | ||
<- z, FooBars.DECLARE_CONST2 | ||
service SomeService("wed"): | ||
getStr(s: string) -> string | ||
|
||
ability SomeAb: | ||
someArrow(s: string) -> string, string | ||
str: string | ||
|
||
ability SecondAb: | ||
arrow(s: string) -> string | ||
num: u32 | ||
|
||
func funcStr(s: string) -> string, string: | ||
strInFunc <- SomeService.getStr(Declare.DECLARE_CONST) | ||
-- SomeService.getStr(s) | ||
<- strInFunc, s | ||
|
||
-- | ||
-- func diffFunc(s: string) -> string: | ||
-- differentStr <- SomeService.different(s) | ||
-- <- differentStr | ||
-- | ||
-- func unit(): | ||
-- funcStr("") | ||
|
||
-- func bbbbbbb() | ||
-- | ||
-- func aaaaaa(): | ||
-- closure = (a: string) -> string: | ||
-- <- SomeService.str() | ||
|
||
func handleSecAb {SomeAb, SecondAb}() -> string, string: | ||
SomeAb.someArrow("eferfrfrf") | ||
b, c <- SomeAb.someArrow("efre") | ||
<- b, c | ||
|
||
func returnAb(s: string) -> SomeAb: | ||
SomeAb = SomeAb(someArrow = funcStr, str = s) | ||
<- SomeAb | ||
|
||
func handleAb(fff: string) -> string, string: | ||
SomeAb = returnAb(fff) | ||
SecondAb = SecondAb(arrow = funcStr, num = 12) | ||
d, g <- handleSecAb{SomeAb, SecondAb}() | ||
<- d, g |
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
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,37 @@ | ||
aqua Main | ||
|
||
use DECLARE_CONST, decl_bar from "imports_exports/declare.aqua" as Declare | ||
|
||
export handleAb, SomeService | ||
|
||
service SomeService("wed"): | ||
getStr(s: string) -> string | ||
|
||
ability SomeAb: | ||
someArrow(s: string) -> string, string | ||
str: string | ||
|
||
ability SecondAb: | ||
arrow(s: string) -> string | ||
num: u32 | ||
|
||
func funcStr(s: string) -> string, string: | ||
strInFunc <- SomeService.getStr(Declare.DECLARE_CONST) | ||
strInFunc2 <- SomeService.getStr(s) | ||
<- strInFunc, strInFunc2 | ||
|
||
func handleSecAb {SomeAb, SecondAb}() -> string, string, string, u32: | ||
SomeAb.someArrow("eferfrfrf") | ||
b, c <- SomeAb.someArrow("efre") | ||
d <- SecondAb.arrow(SomeAb.str) | ||
<- b, c, d, SecondAb.num | ||
|
||
func returnAb(s: string) -> SomeAb: | ||
SomeAb = SomeAb(someArrow = funcStr, str = s) | ||
<- SomeAb | ||
|
||
func handleAb(fff: string) -> string, string, string, u32: | ||
SomeAb = returnAb(fff) | ||
SecondAb = SecondAb(arrow = funcStr, num = 12) | ||
res1, res2, res3, res4 <- handleSecAb{SomeAb, SecondAb}() | ||
<- res1, res2, res3, res4 |
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,11 @@ | ||
import {handleAb, registerSomeService} from "../compiled/examples/abilities"; | ||
|
||
export async function abilityCall(): Promise<[string, string, string, number]> { | ||
registerSomeService({ | ||
getStr: (s: string) => { | ||
return s + "123" | ||
} | ||
}) | ||
|
||
return await handleAb("some_string") | ||
} |
Oops, something went wrong.