From: Valtteri V. <vu...@pu...> - 2002-12-01 02:15:47
|
ok, I just figured out a bug here. The code interacts wrongly when inheritance crossing package boundaries is involved, so let's add another case: 5. :include with the same :conc-name in different packages: (in-package :a) (defstruct (s1 (:conc-name foo-)) a) (in-package :b) (defstruct (s2 (:include a:s1) (:conc-name foo-)) b) This will create an accessor A:FOO-A as expected. However: Old behavior: accessors FOO-A and FOO-B each taking an argument of type S2 will be created in package B. New behavior: is the same as old behavior, since the INHERITED-ACCESSORS list that S2 will get only contains the symbol A:FOO-A and the newly minted ACCESSOR-NAME of inherited slot A's DSD will be B:FOO-A. I think the right thing to do here would be to import the definition of FOO-A from package A into package B, such that this B:FOO-A can be used to access both instances of S1 and S2 (as happens when no package boundaries are crossed)? In other news, the STYLE-WARN lossage I mentioned in the previous post happens during force-delayed-defbangstructs. I'm not certain whether there's a sane way of avoiding an attempt to issue a warning here, besides disabling the warning code during cross-compile? But I didn't look at this too closely yet. -v |