fix: FindArrayInClosure — search plain objects in object[] (display class pattern)#81
Closed
korchak-aleksandr wants to merge 1 commit intomainfrom
Closed
fix: FindArrayInClosure — search plain objects in object[] (display class pattern)#81korchak-aleksandr wants to merge 1 commit intomainfrom
korchak-aleksandr wants to merge 1 commit intomainfrom
Conversation
…lass pattern) Closure.Constants can contain a plain <>c__DisplayClass holding the array, not only a Delegate. Recurse into any non-null item, not just Delegate.Target.
Collaborator
Author
|
Closing: Framework handles MemoryExtensions.Contains normalization before expressions reach data-linq, so this fix is not needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
FindArrayInClosureonly recursed intoDelegate.Targetwhen searchingobject[]items. ButClosure.Constantscan contain a plain<>c__DisplayClassobject (not aDelegate) that holds the actual array:This caused
TryExtractArrayFromSpanExpressionto returnnullfor Pattern 2 when used viaExecuteWithQueryCompilationin Mindbox.Framework, resulting inNotSupportedExceptionat runtime.Fix
One-liner: recurse into any non-null item in
object[], not justDelegate.Target.