-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
demonstrate that actor methods cannot be imported explicitly
- Loading branch information
Showing
3 changed files
with
35 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,30 @@ | ||
//MOC-FLAG --actor-idl actor-import | ||
//MOC-FLAG --actor-alias self lg264-qjkae | ||
|
||
// this imports our own IDL, stored in actor-import | ||
|
||
// currently hard-codes the ic-ref self id | ||
// once we have actor aliases we can let run.sh set an alias. | ||
|
||
import imported1 "ic:lg264-qjkae"; | ||
import { go = imported1_go } "ic:lg264-qjkae"; | ||
import { go = imported2_go } "canister:self"; | ||
|
||
actor a { | ||
public func go() : async (actor {}) = async imported1; | ||
public func go2() : async (actor {}) = async await (imported1_go()); | ||
public func go3() : async (actor {}) = async await (imported2_go()); | ||
}; | ||
//CALL ingress go "DIDL\x00\x00" | ||
//CALL ingress go2 "DIDL\x00\x00" | ||
//CALL ingress go3 "DIDL\x00\x00" | ||
|
||
|
||
//SKIP run | ||
//SKIP run-ir | ||
//SKIP run-low | ||
|
||
// Skip running on drun for now; hard to pass a `--actor-alias` that works for | ||
// both drun and ic-ref-run | ||
//SKIP comp | ||
|
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 @@ | ||
explicit-actor-import.mo:10.8-10.29: type error [M0114], object pattern cannot consume actor type | ||
actor {go : shared () -> async actor {}} | ||
explicit-actor-import.mo:11.8-11.29: type error [M0114], object pattern cannot consume actor type | ||
actor {go : shared () -> async actor {}} |
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 @@ | ||
Return code 1 |