back2dos / tinkerbell

MIT License
83 stars 8 forks source link

Delegation parameterized member property compilation error #31

Closed MetaChrome closed 11 years ago

MetaChrome commented 11 years ago

http://pastebin.com/XPqwU8ma

This error occurs on the fact that Foo.owner has a type T. I presume that this is a valid use of delegation. Please, please, please specify:

  1. An ETA to a fix OR
  2. Is this problem isolated to lang.macros.Forward? If there isn't an expected fix by today, I'll probably be working to fix it this evening so please provide any input you may have to get this working asap. Why is the delegation class's parameter being transplanted into the forwarding class? The parameter of the delegation class is irrelevant apart from a check that the specified parameter conforms to any constraints. The parameterized member property needs to have a type that is specified by the instance. What is tink doing at this time? I either need this functionality or not use tink and I really want to move forward from this problem.
back2dos commented 11 years ago

Fixed. Note that if you do run into problems of this kind, tink is both optional and granular.

In your example, this would fix the issue: https://gist.github.com/3601314

The delegation generator will leave present fields untouched. However any additional fields would be correctly forwarded.