Skip to content

Commit

Permalink
issue-4625 repro
Browse files Browse the repository at this point in the history
  • Loading branch information
crusso committed Aug 15, 2024
1 parent 9b67c0c commit 344f963
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/run-drun/issue-4625.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//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;
};

//SKIP run
//SKIP run-ir
//SKIP run-low
//SKIP ic-ref
4 changes: 4 additions & 0 deletions test/run-drun/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/run-drun/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/run-drun/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/run-drun/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/run-drun/ok/issue-4625.tc.ok
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
issue-4625.mo:11.14-11.18: type error [M0096], expression of type
actor {type X = Null; f : shared X__1 -> async ()}
cannot produce expected type
actor {f : shared X -> async ()}

0 comments on commit 344f963

Please sign in to comment.