Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: issue-4625 repro #4659

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions test/fail/issue-4625.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//MOC-FLAG --actor-idl issue-4625
//MOC-FLAG --actor-alias call lg264-qjkae
import lib "issue-4625/lib";
import call "canister:call";

actor {
type T = actor {
f(x : lib.X) : async ();
};

let z : T = call;
};
4 changes: 4 additions & 0 deletions test/fail/issue-4625/call.did
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type X = null;
service : {
f: (X) -> ();
}
7 changes: 7 additions & 0 deletions test/fail/issue-4625/call.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import lib "lib";

actor {
public shared func f(x : lib.X) : async () {
();
};
}
4 changes: 4 additions & 0 deletions test/fail/issue-4625/lg264-qjkae.did
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type X = null;
service : {
f: (X) -> ();
}
3 changes: 3 additions & 0 deletions test/fail/issue-4625/lib.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module {
public type X = ();
}
4 changes: 4 additions & 0 deletions test/fail/ok/issue-4625.tc.ok
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
issue-4625.mo:11.15-11.19: type error [M0096], expression of type
actor {type X = Null; f : shared X__1 -> async ()}
cannot produce expected type
actor {f : shared X -> async ()}
1 change: 1 addition & 0 deletions test/fail/ok/issue-4625.tc.ret.ok
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Return code 1