Skip to content

--interp FileSeek.SeekEnd is in opposite direction #3610

Closed
@andyli

Description

The following is part of sys test, but simplified.
I discover that while trying to run the sys test for macro target.

import sys.io.*;

class Test {
    static function main():Void {
        File.saveContent('testcase-test-file', "test\n1234");
        var file = File.read('testcase-test-file', false);
        file.seek(2, FileSeek.SeekEnd);
        trace(file.tell());     //7     wrong, should be 11
        file.seek(-2, FileSeek.SeekEnd);
        trace(file.tell());     //11    wrong, should be 7
    }
}

Following will run the above code in neko and --interp, printing different results:

-main Test
-neko Test.n
-cmd neko Test.n

--next 
-main Test
--interp

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

platform-macroEverything related to Haxe macros

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions