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

[neko] crash on call with side effects after access of Dynamic Map #5755

Closed
Gama11 opened this issue Oct 14, 2016 · 2 comments
Closed

[neko] crash on call with side effects after access of Dynamic Map #5755

Gama11 opened this issue Oct 14, 2016 · 2 comments
Labels
platform-neko Everything related to Neko unresolved Issue was unresolved

Comments

@Gama11
Copy link
Member

Gama11 commented Oct 14, 2016

On latest Haxe dev (a5d48bb) as well as 3.3.0-rc.1, the code snippet compiled to Neko crashes with:

Called from StringBuf::$statics line 1
Called from Main::main line 6
Called from A::clone line 18
Uncaught exception - Invalid field access : clone
Error: Command failed with error 1

On Haxe 3.2.1, it works fine, so it's a regression.

class Main {
    static var i:Int = 0;

    static function main() {
        var map:Map<String, Dynamic> = ["a" => new A(new B())];
        map.get("a").clone(i++);
    }
}

class A {
    public var b:B;

    public function new(b:B) {
        this.b = b;
    }

    public function clone(i:Int) {
        return new A(b.clone());
    }
}

class B {
    public function new() {}

    public function clone():B {
        return new B();
    }
}
@Simn
Copy link
Member

Simn commented Jan 7, 2017

I cannot seem to reproduce this particular error, though I do get one one the b.clone() for some reason.

@Simn Simn modified the milestone: 4.0 Jan 9, 2017
@Gama11
Copy link
Member Author

Gama11 commented Apr 22, 2017

Are you sure? I still get the exact same stacktrace on HEAD (8c3613e).

@markknol markknol added the platform-neko Everything related to Neko label Jul 12, 2017
@Simn Simn modified the milestones: Release 4.0, Bugs Apr 17, 2018
@Simn Simn added the unresolved Issue was unresolved label Jun 5, 2020
@Simn Simn closed this as completed Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform-neko Everything related to Neko unresolved Issue was unresolved
Projects
None yet
Development

No branches or pull requests

3 participants