Inferr 1. type parameter of inferredType( myExpression ) [message #1723044] |
Thu, 11 February 2016 03:58  |
Eclipse User |
|
|
|
Hi,
in my inferrer I need to set the first type parameter of an inferrerType as a method parameter. Is there a way to do this?
Example:
The inferred type of my expression will be: List<Integer>, so I need a parameter of type Integer. In the inferrer I just have the expression so I need to inferr: toParameter( it, 'paramName', inferrerType( myExpression ) ) which is wrong.
Something like this would be needed:
toParameter( it, 'paramName', inferrerType( myExpression, 0 ) ), where 0 will indicate to use the first generic argument of inferred type.
Any ideas or is an enhancement request needed?
Thanks
~Ingo
|
|
|
|
|
|
Re: Inferr 1. type parameter of inferredType( myExpression ) [message #1723596 is a reply to message #1723126] |
Tue, 16 February 2016 12:25  |
Eclipse User |
|
|
|
Hi Sven,
thanks for the explanation. This matches what I thought so far. Is this then a feature request to introduce a construct like "inferrerType( myExpression, 0 ) ", where the index is the type parameter of the expression type? Or is that something which can be done by extending the existing xtext version by myself?
|
|
|
Powered by
FUDForum. Page generated in 0.04754 seconds