MinecraftDev
MinecraftDev copied to clipboard
Warn about unconditional inject-at-head-cancel mixins
trafficstars
This can be made with an Injector mixin that always cancels the rest of the function (at head) and possibly returns a different value.
This is effectively an overwrite with undefined behavior.
- The ordering is undefined unless you change mixin priority. Two of these could conflict
- Any transformations afterwards are entirely ignored. An overwrite would be more explicit about this behavior.
If an inject-at-head injector has a conditional that can change (unfamiliar with control flow in PSI, may not be feasible), then said warning should not be risen.
This should be fairly easy to implement.