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
Call resolver: an explicit receiver is ignored when the caller's own class has a method of that name #3837
bugUnintended behavior or logic failure in the enginecore-engineModifications to the central physics and parsing enginescope:infraCI, tooling, churn/factory, docs infrastructure
Bug: a qualified call whose receiver is a field or a local of another type still resolves to the caller's own class when that class has a method of the same name. The class step wins over the receiver.
Example, members.entrySet() inside JsonObject:
members is a LinkedTreeMap, so the call runs LinkedTreeMap.entrySet;
the engine links JsonObject.entrySet instead.
Evidence
Measured vs scip-java 0.12.3 on google/gson @ 854c8255 (#3783). Of the 1,923 confident wrong links, 270 are not an overload choice (#3835's pattern). Their samples are this shape, all checked in source:
site
engine links
scip-java links
gson/.../JsonObject.java:55, in deepCopy: for (... : members.entrySet())
gson/src/test/.../JsonPrimitiveTest.java: value.toString() on a JsonPrimitive
LazilyParsedNumber.java:toString@75
JsonElement.java:toString@421
It overlaps #3756, and also sends links out of the repo. The same tree gives 473 confident external links: calls that scip-java resolves only to the JDK, linked to a gson method instead. For example, collection.add("hello") on a java.util.Collection is linked to JsonArray.add, and labelToSubtype.entrySet() on a Map to JsonObject.entrySet. That is #3756's untyped-receiver shadowing, measured in Java.
Likely fix
The resolver must not take the class step for a call qualified by a receiver other than this or super. A qualified call should resolve through the receiver's type, where it is known, using the typed and receiver steps. When it isn't known, the link belongs in the ambiguous group, not a confident same-class link.
Check the net change on every language, since the resolver is shared: Python's self.x.m() and TypeScript's this.x.m() take the same path.
bugUnintended behavior or logic failure in the enginecore-engineModifications to the central physics and parsing enginescope:infraCI, tooling, churn/factory, docs infrastructure
Activity
SCIP call-graph adapter; Java measured vs scip-java; SCIP-vs-tsc cros…
SCIP call-graph adapter; Java measured vs scip-java; SCIP-vs-tsc cros…
call resolver (#3837): tests, regenerated Java/Python resolution base…
call resolver: an explicit receiver no longer defaults to the caller'…