You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Body-local interface types are dropped, so a user push() on such a variable lowers to ArrayPush #11138
An interface declared inside a block or function body is dropped without being recorded as an interface type. A variable typed with that interface is then treated as a possible array. So a push method (and other names that collide with Array methods) on such a variable is lowered to Expr::ArrayPush instead of calling the user's method.
Module-level interfaces are recorded correctly and do not show this.
Found while fixing #11128 (PR #11137). That PR makes dynamic new C() and InstanceType<...> receivers dispatch normally, but it does not cover this route. The fix is probably to register body-local interfaces the same way module-level ones are, so that the array gate in local_array_methods.rs / array_only_methods.rs sees a known non-array type.
Not yet reduced against a real package; confirm the exact output before fixing.
Activity