This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Parameterizing on incomplete types


On 12/01/2011 01:05 AM, Per Bothner wrote:
The attached patch solved the name-lookup part of the problem.

I checked in the patch.


I now get:

string>:1:27: type parameter T must extend Object which is incompatible
with Foo

This is because we haven't set yet Foo's supertypes. Of course this is
nonsense in the special case of Object. I think we can fix the general
case by moving the subtype test later, probably to InlineCalls.
The tricky part is figuring out how to do the subtype test in InlineCalls.

Worst case, we can special-case Object, and change teh general case to
warnings.

I checked in a patch that effectively special-cases Object. (Specifically, I added an "optimization" is ClassType#isSubclass.) So we no longer get that error - now we just have to deal with

<string>:1:1: missing implementation for java.lang.Comparable.compareTo(T)int

How ambitious are you about getting into Deep Kawa Stuff? :-)
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]