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

[php7] Cannot use temporary expression in write context #6257

Closed
Gama11 opened this Issue May 11, 2017 · 0 comments

Comments

Projects
None yet
3 participants
@Gama11
Member

Gama11 commented May 11, 2017

This is isolated from dox's Infos.hx. The old PHP target runs it fine, but PHP7 errors.

class Main {
	public static function main() {
		var packages:Map<String, Map<String, String>> = ["" => new Map()];
		packages.get("").set("foo", "bar");
	}
}

PHP Fatal error: Cannot use temporary expression in write context in Main.php on line 22

Line 22:

($packages_data[""] ?? null)->data["foo"] = "bar";
> haxe -version
4.0.0 (git build HEAD @ fedbe2c)
> php7.0 -version
PHP 7.0.19-1+deb.sury.org~trusty+1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment