HaxeFoundation / HaxeFoundation/haxe

[std] haxe.io.Input.readAll method always throws Error.Blocked

Open
#6,429 0 comments 0 reactions 0 assignees View on GitHub
standard library
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

When implementing only `haxe.io.Input.readByte` method, leaving out base `haxe.io.Input.readAll` implementation, an `Error.Blocked` is always thrown.

To reproduce run following code:
```
class Test {
static function main() {
trace(new haxe.io.StringInput("test input").readAll().toString() == "test input");
}
}
```
after commenting out `haxe.io.BytesInput.readBytes` method first.

Solution would be to remove a loop (and a try-catch since it's not really needed) in a `haxe.io.Input.readAll` method.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.