Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Here is another problem that has to be solved to support compiled extensions. I only discovered it now because I always used "parcel Lucy;" in my test extensions. When i switched to a different parcel, I got the following error message:
Non-matching signatures for mytokenizer_MyTokenizer_equals and lucy_Obj_equals
MyTokenizer subclasses Analyzer which subclasses Obj. The declaration of the Equals method looks like this:
public bool_t Equals(MyTokenizer *self, Obj *other);
Checking the signature with the one of Obj#Equals fails in two places:
- When comparing the type of the "other" argument, it turns out that the specifier of the argument's Obj type is "mytokenizer_Obj". This should be "lucy_Obj", but the specifier is built using the current parcel during parsing. I think the solution is to store only class names during parsing, and lookup the parcels of every object type after parsing. The signature check is only the first place where this breaks. Using the wrong specifiers would cause all kinds of other trouble later.
- When comparing the argument names, the parcel is also taken into account. This should be easy to fix.