[ https://issues.apache.org/jira/browse/TINKERPOP-1972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16638941#comment-16638941 ]
Florian Hockmann commented on TINKERPOP-1972: --------------------------------------------- Looks like I got down to the problem: The method {{Bytecode.AddStep()}} takes as its second argument a {{params object[] args}} and we pass all arguments always as an array to this function. This results in each argument being an element of the {{args}} array that {{AddStep}} takes. However, for some reason the compiler treats an array with a generic type differently here and {{args}} will be an array that only has one element, namely the generic array. So {{string[] \{"a", "b"\}}} becomes {{object[] \{"a", "b"\}}} but {{S[] \{1, 2, 3\}}} becomes {{object[] \{object[] \{1, 2, 3\}\}}} I just manually adjusted the {{Inject}} step to use an {{object[]}} instead of {{S[]}} and it fixed the problem. The failing scenario also succeeds with this change. So, we now only need to use this fix in the code generation for Gremlin.Net. I'll try to implement this tomorrow and then push a commit to the branch [~jorgebg] already started for this issue. > inject() tests are throwing exceptions in .NET GLV tests > -------------------------------------------------------- > > Key: TINKERPOP-1972 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1972 > Project: TinkerPop > Issue Type: Bug > Components: dotnet > Affects Versions: 3.2.9 > Reporter: stephen mallette > Assignee: stephen mallette > Priority: Minor > > New GLV tests were added in TINKERPOP-1963 and are generating this error: > {code} > Failures: > 1) g_injectX1X_chooseXisX1X__constantX10Xfold__foldX: Failed > System.NotSupportedException: Type is not supported. > at System.Array.InternalCreate(Void* elementType, Int32 rank, Int32* > pLengths, Int32* pLowerBounds) > at System.Array.CreateInstance(Type elementType, Int32 length) > at > Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation.TraversalParser.BuildParameters(MethodInfo > method, Token token, IDictionary`2& genericParameterTypes) in > /home/smallette/git/apache/incubator-tinkerpop/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs:line > 268 > at > Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation.TraversalParser.GetTraversalFromTokens(IList`1 > tokens, GraphTraversalSource g, IDictionary`2 contextParameterValues, String > traversalText) in > /home/smallette/git/apache/incubator-tinkerpop/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs:line > 90 > at > Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation.TraversalParser.GetTraversal(String > traversalText, GraphTraversalSource g, IDictionary`2 contextParameterValues) > in > /home/smallette/git/apache/incubator-tinkerpop/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs:line > 62 > at > Gremlin.Net.IntegrationTest.Gherkin.CommonSteps.TranslateTraversal(String > traversalText) in > /home/smallette/git/apache/incubator-tinkerpop/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/CommonSteps.cs:line > 101 > 2) g_injectX2X_chooseXisX1X__constantX10Xfold__foldX: Failed > System.NotSupportedException: Type is not supported. > at System.Array.InternalCreate(Void* elementType, Int32 rank, Int32* > pLengths, Int32* pLowerBounds) > at System.Array.CreateInstance(Type elementType, Int32 length) > at > Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation.TraversalParser.BuildParameters(MethodInfo > method, Token token, IDictionary`2& genericParameterTypes) in > /home/smallette/git/apache/incubator-tinkerpop/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs:line > 268 > at > Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation.TraversalParser.GetTraversalFromTokens(IList`1 > tokens, GraphTraversalSource g, IDictionary`2 contextParameterValues, String > traversalText) in > /home/smallette/git/apache/incubator-tinkerpop/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs:line > 90 > at > Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation.TraversalParser.GetTraversal(String > traversalText, GraphTraversalSource g, IDictionary`2 contextParameterValues) > in > /home/smallette/git/apache/incubator-tinkerpop/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs:line > 62 > at > Gremlin.Net.IntegrationTest.Gherkin.CommonSteps.TranslateTraversal(String > traversalText) in > /home/smallette/git/apache/incubator-tinkerpop/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/CommonSteps.cs:line > 101 > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)