Skip to content

Commit

Permalink
[move-compiler] add test for cross module init call in sui-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
yanganto committed Dec 14, 2024
1 parent 5e8158a commit 8fefb15
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// check that fun `init` can be used cross module in sui-mode
module 0x1::M {
fun init(_ctx: &mut sui::tx_context::TxContext) { }
}

module 0x1::Tests {
#[test]
fun tester() {
use 0x1::M;
let ctx = sui::tx_context::TxContext {};
M::init(&ctx);
}
}

module sui::tx_context {
struct TxContext has drop {}
}

0 comments on commit 8fefb15

Please sign in to comment.