On Fri, Dec 19, 2014 at 5:13 PM, Jim Blandy <j...@red-bean.com> wrote:
> The bug is surprising, in that it claims that the bytecode that consumes > the value determines whether a warning is issued (SETLOCAL;CALL), rather > than the bytecode doing the fetch. > > Is that the intended behavior? I can't see how that makes much sense. > That's intentional, yes. The idea is that phrases like these: if (obj.prop === undefined) // ok if (obj.prop && obj.prop.prop2) // ok shouldn't cause warnings. These are "detecting" uses: obj.prop is fetched for the purpose of determining whether or not it exists. But to distinguish "detecting" uses from others, we have to look at the bytecode that consumes the value. All this is one reason I'd like to remove the feature --- the bytecode inspection here is pretty sloppy. See comment 4 in the bug. -j _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform