Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

indexing zero-length lists #813

Open
thautwarm opened this issue Mar 30, 2022 · 2 comments
Open

indexing zero-length lists #813

thautwarm opened this issue Mar 30, 2022 · 2 comments

Comments

@thautwarm
Copy link

thautwarm commented Mar 30, 2022

.NET 6 throws ArgumentOutOfRangeException when executing the following code:

newData = new List<T>(icnt);
for (int i = start; i > stop; i += step) {
newData[index++] = l[i];

@thautwarm
Copy link
Author

It seems that such code is not used in IronPython 2. I found this bug when reusing the code for a Unity IL2CPP compatible .NET Python implementation.

@slozier
Copy link
Contributor

slozier commented Mar 30, 2022

It seems that such code is not used in IronPython 2. I found this bug when reusing the code for a Unity IL2CPP compatible .NET Python implementation.

Indeed, looks like extended slicing doesn't work with List<T> and this code is never invoked.

Doesn't appear to be an issue with IronPython 3 (the code has changed since it split from ironpython2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants