You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.
The following code results in a compiler exception from this location.
let arr1 = [1,2,3];
let arr2 = [6, size = 3];
let concatenated = arr1 + arr2;
let slice = concatenated[arr1[0]..arr1[1]...];
A similar issue may exist for other open ended ranges (as part of slicing or as part of copy-and-update).
Edit: Capturing another case that seems to silently fail here since it is also an issue with open ended ranges; this may or may not be the same/a similar issue. This is the case that throws during building the compilation:
When the Expression Verification determines the type of array item expressions, it seems it always assigns a type parameter as the type. I suppose this might be done because the type of the array items expressions need to be determined later on through context. This type is eventually resolved by using a InferenceContextModule.Resolver under BuildUserDefinedImplementation.
The root of the issue is that this ultimate resolution for the type of array items expressions comes too late if an array item expression is used as a component of a slicing range expression. A slicing range expression is resolved here.
Note that the issue is specific to the step of the slicing range being derived from an array item expression, and only when one or both of the start and end components are missing.
The following code results in a compiler exception from this location.
A similar issue may exist for other open ended ranges (as part of slicing or as part of copy-and-update).
Edit: Capturing another case that seems to silently fail here since it is also an issue with open ended ranges; this may or may not be the same/a similar issue. This is the case that throws during building the compilation:
The text was updated successfully, but these errors were encountered: