0
Fixed

2.0.0a4 - ArgumentException: Incorrect number of arguments supplied for call to method 'Int32 get_Item(Int32)'

TowerCrow 12 months ago updated by Lazlo Bonin (Lead Developer) 6 months ago 4

The code works fine in live mode but this error comes up when I try to generate C# code.

ArgumentException: Incorrect number of arguments supplied for call to method 'Int32 get_Item(Int32)'
Parameter name: property
System.Linq.Expressions.Expression.Property (System.Linq.Expressions.Expression expression, System.Reflection.PropertyInfo property) (at <1b13ba6391c74847bbc3eddc86df7eee>:0)
Ludiq.InstancePropertyAccessor`2[TTarget,TProperty].Compile () (at Assets/Ludiq/Ludiq.Core/Runtime/Reflection/Optimization/InstancePropertyAccessor.cs:49)
Ludiq.OptimizedReflection.GetPropertyAccessor (System.Reflection.PropertyInfo propertyInfo) (at Assets/Ludiq/Ludiq.Core/Runtime/Reflection/Optimization/OptimizedReflection.cs:237)
Ludiq.OptimizedReflection.Prewarm (System.Reflection.PropertyInfo propertyInfo) (at Assets/Ludiq/Ludiq.Core/Runtime/Reflection/Optimization/OptimizedReflection.cs:186)
Ludiq.PropertyInfoStubWriter.GetOptimizedAccessor (System.Reflection.PropertyInfo propertyInfo) (at Assets/Ludiq/Ludiq.Core/Editor/Platforms/PropertyInfoStubWriter.cs:14)
Ludiq.AccessorInfoStubWriter`1+d__2[TAccessor].MoveNext () (at Assets/Ludiq/Ludiq.Core/Editor/Platforms/AccessorInfoStubWriter.cs:57)
System.Collections.Generic.LargeArrayBuilder`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] items) (at <1b13ba6391c74847bbc3eddc86df7eee>:0)
System.Collections.Generic.EnumerableHelpers.ToArray[T] (System.Collections.Generic.IEnumerable`1[T] source) (at <1b13ba6391c74847bbc3eddc86df7eee>:0)
System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at <1b13ba6391c74847bbc3eddc86df7eee>:0)
Ludiq.AotPreBuilder.GenerateStubScript (System.String scriptPath, System.Collections.Generic.IEnumerable`1[T] stubs) (at Assets/Ludiq/Ludiq.Core/Editor/Platforms/AotPreBuilder.cs:142)
Ludiq.Generation+<>c__DisplayClass0_0.b__0 (Ludiq.Task generation) (at Assets/Ludiq/Ludiq.Graphs/Editor/Generation/Generation.cs:101)
Ludiq.Task.Run () (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Task.cs:65)
Ludiq.WindowTaskRunner.RunSynchronous (Ludiq.Task task) (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Runners/WindowTaskRunner.cs:61)
UnityEngine.Debug:LogException(Exception)
Ludiq.WindowTaskRunner:RunSynchronous(Task) (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Runners/WindowTaskRunner.cs:67)
Ludiq.<>c__DisplayClass10_0:b__0() (at Assets/Ludiq/Ludiq.Core/Editor/Tasks/Runners/WindowTaskRunner.cs:33)
System.Threading.ThreadHelper:ThreadStart()

Bolt Version:
2.0.0a4
Unity Version:
2018.3.11f1
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
Bolt 2

Seems like it's the "list get" unit. Graph here: https://imgur.com/zQos8u8

Pending Review

Thanks for the report, will have a look.

Fixed in Alpha

Fixed for Alpha 5.