[ 
https://issues.apache.org/jira/browse/TINKERPOP-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16258535#comment-16258535
 ] 

Florian Hockmann commented on TINKERPOP-1825:
---------------------------------------------

The problem is apparently that we try to convert the Java type to a C# type by 
taking the {{param.type.simpleName}} as the basis:
{code}
def toCSharpParamString = { param ->
    csharpParamTypeName = toCSharpType(param.type.simpleName)
    "${csharpParamTypeName} ${param.name}"
    }
{code}
but that is already {{Object}} for generic parameter types like {{E2}} in this 
case.

I just tried to fix this by checking whether the type is a generic type and 
then simply use {{E2}} instead, but that breaks other steps that aren't generic 
in Gremlin.Net at the moment. So fixing this could require changing more of the 
GLV generation. However, since the generation script isn't exactly easy to 
understand and contains lots of special cases a refactoring might be a good 
idea anyway.

> Gremlin .NET: Constant() step has incorrect parameter defined
> -------------------------------------------------------------
>
>                 Key: TINKERPOP-1825
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1825
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: dotnet
>    Affects Versions: 3.2.6
>            Reporter: Jorge Bay
>             Fix For: 3.2.7
>
>
> The generated method shows the following C# signature:
> {code:java}
> public GraphTraversal<S, E2> Constant<E2>(object e)
> {code}
> When instead it should be:
> {code:java}
> public GraphTraversal<S, E2> Constant<E2>(E2 e)
> {code}
> https://github.com/apache/tinkerpop/blob/f2b4fb980559c8427fa946ad0d5acb42292a0b70/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs#L423-L427
> This forces the user to specify the type of the parameter, when otherwise it 
> could be inferred.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to