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

[php] Static var of type Dynamic holding a function #6158

Closed
kevinresol opened this Issue Apr 6, 2017 · 5 comments

Comments

Projects
None yet
4 participants
@kevinresol
Contributor

kevinresol commented Apr 6, 2017

Haxe revision: 84bf7e5
If a static var is typed as Dynamic and holds a function, making a call to such var will fail.

class Main {
	static function main() {
		Sys.println(Foo.make(1,2,3) + "Text");
	}
}

class Foo {
	// this doesn't work
	public static var make:Dynamic = function(a, b, c) return '$a,$b,$c';
	
	// this works
	// public static var make:Int->Int->Int->String = function(a, b, c) return '$a,$b,$c';
	
}

without -D php7

@RealyUniqueName RealyUniqueName self-assigned this Apr 6, 2017

@Simn Simn added the platform-php label Apr 6, 2017

@Simn

This comment has been minimized.

Show comment
Hide comment
@Simn

Simn Apr 6, 2017

Member

We have to decide if we want to maintain the old PHP generator and make bugfixes for it. It feels like a lot of duplicate work... though I don't really mind as long as @RealyUniqueName is happy.

Member

Simn commented Apr 6, 2017

We have to decide if we want to maintain the old PHP generator and make bugfixes for it. It feels like a lot of duplicate work... though I don't really mind as long as @RealyUniqueName is happy.

@RealyUniqueName

This comment has been minimized.

Show comment
Hide comment
@RealyUniqueName

RealyUniqueName Apr 6, 2017

Member

Simple fixes don't hurt me. Though i'm trying to fix all issues, i'd like to avoid any complex work regardless old genphp.

Member

RealyUniqueName commented Apr 6, 2017

Simple fixes don't hurt me. Though i'm trying to fix all issues, i'd like to avoid any complex work regardless old genphp.

@ncannasse

This comment has been minimized.

Show comment
Hide comment
@ncannasse

ncannasse Apr 6, 2017

Member
Member

ncannasse commented Apr 6, 2017

@kevinresol

This comment has been minimized.

Show comment
Hide comment
@kevinresol

kevinresol Apr 6, 2017

Contributor

We have to decide if we want to maintain the old PHP generator

Does "old" and "new" means php5 and php7 respectively? Or the "new" generator can still generate php5 code? I don't think dropping php5 support is a good idea...

Contributor

kevinresol commented Apr 6, 2017

We have to decide if we want to maintain the old PHP generator

Does "old" and "new" means php5 and php7 respectively? Or the "new" generator can still generate php5 code? I don't think dropping php5 support is a good idea...

@RealyUniqueName

This comment has been minimized.

Show comment
Hide comment
@RealyUniqueName

RealyUniqueName Apr 7, 2017

Member

New generator generates php code for PHP 7.0 and higher.

Member

RealyUniqueName commented Apr 7, 2017

New generator generates php code for PHP 7.0 and higher.

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