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

[eval] String.indexOf with invalid index aborts with `Invalid_argument("index out of bounds")` #7601

Open
AlexHaxe opened this issue Nov 6, 2018 · 8 comments

Comments

Projects
None yet
5 participants
@AlexHaxe
Copy link
Contributor

commented Nov 6, 2018

Both lines throw an Invalid_argument("index out of bounds") error, with no further info when running on eval target:

class Test {
	static function main() {
		trace("Haxe is great!".indexOf(" ", -1));
		trace("Haxe is great!".indexOf(" ", 100));
	}
}

@ncannasse ncannasse added this to the Release 4.0 milestone Nov 7, 2018

@ncannasse ncannasse added the bug label Nov 7, 2018

@Simn Simn self-assigned this Nov 13, 2018

@Simn

This comment has been minimized.

Copy link
Member

commented Nov 13, 2018

That means we don't specify the negative value case at the moment...

@Simn

This comment has been minimized.

Copy link
Member

commented Nov 13, 2018

Added test fails on PHP.

@Simn

This comment has been minimized.

Copy link
Member

commented Nov 13, 2018

... and on lua:

src/unitstd/String.unit.hx:71: 5 should be 6
src/unitstd/String.unit.hx:72: -1 should be 6
@Simn

This comment has been minimized.

Copy link
Member

commented Nov 21, 2018

@Simn

This comment has been minimized.

Copy link
Member

commented Nov 28, 2018

bump

@RealyUniqueName

This comment has been minimized.

Copy link
Member

commented Nov 28, 2018

I'll do it, I just don't know when )

RealyUniqueName added a commit that referenced this issue Nov 29, 2018

@ncannasse

This comment has been minimized.

Copy link
Member

commented Dec 5, 2018

@Simn could you merge your eval changes ? we don't really need to block RC with the fix

Simn added a commit that referenced this issue Dec 5, 2018

@Simn

This comment has been minimized.

Copy link
Member

commented Dec 5, 2018

I have pushed the fixes without the tests.

@Simn Simn modified the milestones: Release 4.0, Release 4.1 Dec 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.