`Fill with mock` with primary constructor.
Socolin opened this issue · 1 comments
Socolin commented
When trying to use the action on a class with a Primary Constructor, I'm getting this error
--- EXCEPTION #1/2 [IndexOutOfRangeException]
Message = “Index was outside the bounds of the array.”
ExceptionPath = Root.InnerException
ClassName = System.IndexOutOfRangeException
Data.ThreadLocalDebugInfo = “
endpoint `MainProtocol.SolutionModel.solutions.[2].riderAltEnterModel.altEnterPopup.[Host].$.executeItem` (12554649327414042504)
-> RdDispatcher::FlushAll
”
HResult = COR_E_INDEXOUTOFRANGE=80131508
Source = System.Private.CoreLib
StackTraceString = “
at System.String.get_Chars(Int32 index)
at Abc.MoqComplete.ContextActions.Services.CsharpMemberProvider.GetConstructorParameters(String constructorString)+MoveNext() in D:\a\Abc.MoqComplete\Abc.MoqComplete\Abc.MoqComplete\Abc.MoqComplete\ContextActions\Services\CsharpMemberProvider.cs:line 22
at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items) in AddRange.il:line IL_006D mvid ECA4
at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source) in ToArray.il:line IL_0000 mvid ECA4
at Abc.MoqComplete.ContextActions.FillWithMock.FillParamWithMockContextAction.ExecutePsiTransaction(ISolution solution, IProgressIndicator progress) in D:\a\Abc.MoqComplete\Abc.MoqComplete\Abc.MoqComplete\Abc.MoqComplete\ContextActions\FillWithMock\FillParamWithMockContextAction.cs:line 114
at JetBrains.ReSharper.Feature.Services.Bulbs.BulbActionBase.<>c__DisplayClass2_1.<Execute>b__1() in BulbActionBase.il:line IL_0000 mvid E7D2
at JetBrains.ReSharper.Psi.Transactions.PsiTransactions.Execute(String commandName, Action handler) in Execute.il:line IL_00AB mvid 8515
”
--- Outer ---
--- EXCEPTION #2/2 [LoggerException]
Message = “Index was outside the bounds of the array.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.Util.LoggerBase.Log(LoggingLevel level, String message, Exception ex) in Log.il:line IL_0024 mvid 9968
at JetBrains.Diagnostics.LogEx.Error(ILog this, Exception ex, String message) in Error.il:line IL_0000 mvid CC54
at JetBrains.Util.Logging.Logger.LogException(Exception ex) in LogException.il:line IL_0000 mvid 9968
at JetBrains.ReSharper.Psi.Transactions.PsiTransactions.Execute(String commandName, Action handler) in Execute.il:line IL_0019 mvid 8515
at JetBrains.ReSharper.Feature.Services.Bulbs.BulbActionBase.<>c__DisplayClass2_0.<Execute>b__0(IProgressIndicator progress) in BulbActionBase.il:line IL_007E mvid E7D2
at JetBrains.RdBackend.Common.Features.Util.Progress.RiderTaskExecutor.<>c__DisplayClass6_0.<ExecuteTask>b__0(Lifetime lifetime) in RiderTaskExecutor.il:line IL_00B4 mvid 072D
at JetBrains.Lifetimes.Lifetime.Using[T](Func`2 action) in Using.il:line IL_0014 mvid CC54
at JetBrains.RdBackend.Common.Features.Util.Progress.RiderTaskExecutor.ExecuteTask(String taskName, TaskExecutorOptions options, Action`1 task) in ExecuteTask.il:line IL_0000 mvid 072D or ExecuteTask.il:line IL_002E mvid 072D
at JetBrains.RdBackend.Common.Features.Util.Progress.RiderTaskExecutor.ExecuteTask(String taskName, TaskCancelable cancelable, Action`1 task) in ExecuteTask.il:line IL_0000 mvid 072D or ExecuteTask.il:line IL_002E mvid 072D
at JetBrains.ReSharper.Feature.Services.Bulbs.BulbActionBase.Execute(ISolution solution, ITextControl textControl) in Execute.il:line IL_011A mvid E7D2
at JetBrains.ReSharper.Feature.Services.Intentions.IntentionAction.MyExecutableProxi.Execute() in Execute.il:line IL_00D1 mvid E7D2
at JetBrains.Application.UI.Controls.BulbMenu.Keys.BulbActionKey.Clicked() in Clicked.il:line IL_0000 mvid 5434
at JetBrains.RdBackend.Common.Features.Services.RiderBulbMenuComponent.HandleItemClicked(Object objKey, JetPopupMenu jetPopupMenu, LifetimeDefinition viewModelDefinition, Boolean terminateAllViewModels, Boolean timestampChanged) in HandleItemClicked.il:line IL_009E mvid 072D
at JetBrains.Application.UI.Controls.JetPopupMenu.JetPopupMenu.<>c__DisplayClass44_0.<InitViewModel>b__3(JetPopupMenuItem item) in JetPopupMenu.il:line IL_0000 mvid 5434
at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie) in Fire.il:line IL_0054 mvid 9968
at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie) in Fire.il:line IL_0054 mvid 9968
at JetBrains.RdBackend.Common.Features.Services.RdPopupMenuModelBinding.ExecuteItem(Int32 itemId) in ExecuteItem.il:line IL_0026 mvid 072D
at JetBrains.RdBackend.Common.Features.Services.RdPopupMenuModelBinding.<>c__DisplayClass12_0.<.ctor>b__6(Int32 itemId) in RdPopupMenuModelBinding.il:line IL_0000 mvid 072D
at JetBrains.Rd.Tasks.RdTaskEx.<>c__DisplayClass11_0`2.<Set>b__0(Lifetime _, TReq req) in RdTaskEx.il:line IL_0000 mvid E037
at JetBrains.Rd.Tasks.RdCall`2.RunHandler(TReq value, Lifetime externalCancellation, Object moniker) in RunHandler.il:line IL_003B mvid E037
at JetBrains.Rd.Tasks.RdCall`2.<>c__DisplayClass24_0.<OnWireReceived>b__0() in RdCall.il:line IL_0000 mvid E037
at JetBrains.Rd.Impl.MessageBroker.RdWireableDispatchHelper.<>c__DisplayClass12_0.<DoDispatch>b__0() in RdWireableDispatchHelper.il:line IL_008B mvid E037
at JetBrains.Util.Concurrency.ExecutionContextEx.<>c__DisplayClass0_0.<Run>b__0(Object _) in ExecutionContextEx.il:line IL_0011 mvid 9968
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) in RunInternal.il:line IL_0040 mvid 0B73
at JetBrains.Util.Concurrency.ExecutionContextEx.Run(ExecutionContext context, ContextCallback callback, Object state) in Run.il:line IL_0028 mvid 9968
at JetBrains.Platform.RdFramework.Impl.RdDispatcher.<>c__DisplayClass15_0.<Queue>b__0() in RdDispatcher.il:line IL_0021 mvid 64F7
at JetBrains.Platform.RdFramework.Impl.RdDispatcher.FlushAll() in FlushAll.il:line IL_001B mvid 64F7
at JetBrains.Util.Concurrency.ExecutionContextEx.<>c__DisplayClass0_0.<Run>b__0(Object _) in ExecutionContextEx.il:line IL_0011 mvid 9968
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) in RunInternal.il:line IL_0040 mvid 0B73
at JetBrains.Util.Concurrency.ExecutionContextEx.Run(ExecutionContext context, ContextCallback callback, Object state) in Run.il:line IL_0028 mvid 9968
at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action) in Execute.il:line IL_0145 mvid 9968
at JetBrains.Threading.ReentrancyGuard.ExecutePendingActions() in ExecutePendingActions.il:line IL_0053 mvid 9968
at JetBrains.Util.Concurrency.ExecutionContextEx.<>c__DisplayClass0_0.<Run>b__0(Object _) in ExecutionContextEx.il:line IL_0011 mvid 9968
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) in RunInternal.il:line IL_0040 mvid 0B73
at JetBrains.Util.Concurrency.ExecutionContextEx.Run(ExecutionContext context, ContextCallback callback, Object state) in Run.il:line IL_0028 mvid 9968
at JetBrains.Threading.JetDispatcher.Closure.Execute() in Execute.il:line IL_0100 mvid 9968
at JetBrains.Threading.JetDispatcher.ProcessQueue(Int32 nMinBucket, Int32 nProcessQueueGeneration) in ProcessQueue.il:line IL_01D0 mvid 9968
at JetBrains.Threading.JetDispatcher.<>c__DisplayClass69_0.<ScheduleQueueProcessingOnNativeMarshaller>g__ProcessQueueWithPriority|0() in JetDispatcher.il:line IL_0000 mvid 9968
at JetBrains.Util.Concurrency.ExecutionContextEx.<>c__DisplayClass0_0.<Run>b__0(Object _) in ExecutionContextEx.il:line IL_0011 mvid 9968
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) in RunInternal.il:line IL_0040 mvid 0B73
at JetBrains.Util.Concurrency.ExecutionContextEx.Run(ExecutionContext context, ContextCallback callback, Object state) in Run.il:line IL_0028 mvid 9968
at JetBrains.Threading.JetDispatcher.Closure.Execute() in Execute.il:line IL_0100 mvid 9968
at JetBrains.Threading.JetDispatcher.<>c__DisplayClass47_0.<Run>b__0(IJetDispatcherPlatformSpecific staticMethods, TimeSpan t, Boolean _) in JetDispatcher.il:line IL_0000 mvid 9968
at JetBrains.Threading.JetDispatcher.RunAndRestartIfNeeded(TimeSpan timeout, Boolean bThrowOnTimeout, Func`4 runLoopAction) in RunAndRestartIfNeeded.il:line IL_0059 mvid 9968
at JetBrains.Threading.JetDispatcher.Run(IProperty`1 condition, TimeSpan timeout, Boolean bThrowOnTimeout) in Run.il:line IL_0027 mvid 9968
at JetBrains.Application.Environment.IJetHostEx.<>c__DisplayClass3_0.<RunHostMessageLoop>b__0(Lifetime lifetime) in IJetHostEx.il:line IL_0025 mvid 5434
at JetBrains.Lifetimes.Lifetime.Using(Action`1 action) in Using.il:line IL_0014 mvid CC54
at JetBrains.Application.Environment.IJetHostEx.RunHostMessageLoop(IComponentContainer containerEnv) in RunHostMessageLoop.il:line IL_0030 mvid 5434
at JetBrains.Application.Environment.HostParameters.MessagePumpMainLoopHostMixin.JetBrains.Application.Environment.HostParameters.IRunMainLoopHostMixin.RunMainLoop(ComponentContainer containerEnv)
at JetBrains.Application.Environment.HostParameters.JetHostParametersCaller.RunMainLoop(ComponentContainer containerEnv) in RunMainLoop.il:line IL_009F mvid 5434
at JetBrains.Application.Environment.JetEnvironment.InternalRun(JetHostParametersCaller host, ComponentContainer containerEnv) in InternalRun.il:line IL_0010 mvid 5434
at JetBrains.Application.Environment.JetEnvironment.CreateAndRun(Full hostparams) in CreateAndRun.il:line IL_002E mvid 5434
at JetBrains.Application.Environment.JetHostItems.CreateAndRun(Full input) in CreateAndRun.il:line IL_000E mvid 5434
at JetBrains.Rider.Backend.Product.RiderBackendProgram.MainX(Assembly assembly, HostInfo hostInfo, String[] args) in MainX.il:line IL_00C7 mvid B414
at JetBrains.Rider.Backend.Product.RiderBackendProgram.<>c.<Main>b__3_0(Lifetime lifetime) in RiderBackendProgram.il:line IL_002B mvid B414
at JetBrains.Lifetimes.Lifetime.Using[T](Func`2 action) in Using.il:line IL_0014 mvid CC54
at JetBrains.Rider.Backend.Product.RiderBackendProgram.Main() in Main.il:line IL_0045 mvid B414
”
ltrzesniewski commented
Thanks for reporting this! 🙂