Closed gerben-stavenga closed 1 year ago
This is by design. The entire abilty and borrow analysis happens after inlining. If this would not be the case, inline functions would be significantly less expressive. For example, you can have an inline function f(a: address): &R
. But you can't have a non-inline function like this.
🐛 Bug
Currently inline functions do not type check on dropping values, ie.
struct OnlyMove { val: u64 } public inline fun drop_onlymove(x: OnlyMove) {}
compiles cleanly. Now if you use it will complain in the caller function, but I think this should be rejected in the module.