diff --git a/external-crates/move/crates/move-compiler/tests/sui_mode/init/cross_module_init_function.move b/external-crates/move/crates/move-compiler/tests/sui_mode/init/cross_module_init_function.move new file mode 100644 index 00000000000000..d3247f553ddb9a --- /dev/null +++ b/external-crates/move/crates/move-compiler/tests/sui_mode/init/cross_module_init_function.move @@ -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 {} +}