module 0x8675309::M { struct S has copy, drop { s: T } fun t(s: signer): S { let x = S { s }; *&x } } // check: READREF_RESOURCE_ERROR //! new-transaction module 0x8675309::N { struct S has copy, drop { s: T } fun t(s: signer): signer { let x = S { s }; x.s } } // check: READREF_RESOURCE_ERROR