]> gitweb.factorcode.org Git - factor.git/commit
cocoa.messages: bind classname.methodname selectors also.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 13 Mar 2018 17:17:33 +0000 (10:17 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 13 Mar 2018 17:17:33 +0000 (10:17 -0700)
commit365584a6443bcd6ee2ff0367e84db8aae259db0e
tree10dbcccd74babce7d37e43add374e1c549c36730
parent9fbddec50e80d27376de8cb616a02d49c8556a8d
cocoa.messages: bind classname.methodname selectors also.

We currently have a problem which is all selectors are assumed to have
the same method effect.  The problem is we can have method collisions,
for example:

NSObject.load is { void { id SEL } }
NSBundle.load is { char { id SEL } }

So, this inferred wrong:

IN: scratchpad [ NSBundle -> mainBundle -> load ] infer .
( -- )

But now we can do this instead:

IN: scratchpad [ NSBundle -> NSBundle.mainBundle -> NSBundle.load ] infer .
( -- x )

It doesn't really fix the original problem, but its a way to workaround
it and added ``method-collisions`` to report on the conflicts.
basis/cocoa/messages/messages.factor