Open
Description
🐛 Bug
Consider the following transactional test:
//# publish
module 0xc0ffee::m {
public fun foo() {}
}
//# publish
module 0xc0ffee::n_ok {
fun main() {
use 0xc0ffee::m;
let f = m::foo;
f();
}
}
//# publish
module 0xc0ffee::n_should_also_be_ok {
fun main() {
use 0xc0ffee::m::foo;
let f = foo;
f();
}
}
The first two modules compile successfully, but the last one fails with:
Error: compilation errors:
warning: unused alias
┌─ TEMPFILE2:19:26
│
19 │ use 0xc0ffee::m::foo;
│ ^^^ Unused 'use' of alias 'foo'. Consider removing it
error: undeclared `foo`
┌─ TEMPFILE2:20:17
│
20 │ let f = foo;
│ ^^^
As far as the user is concerned, there is no difference between the modules n_ok
and n_should_also_be_ok
.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
🆕 New