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

Type parameter constraints on local functions #9559

Open
Simn opened this issue Jun 11, 2020 · 1 comment
Open

Type parameter constraints on local functions #9559

Simn opened this issue Jun 11, 2020 · 1 comment

Comments

@Simn
Copy link
Member

Simn commented Jun 11, 2020

I don't think this is super duper useful, but I also don't see a reason for not allowing this just for the sake of consistency:

class Main {
	static public function main() {
		function f<T:String>(t:T) {}

		f("foo");
		f(12);
	}
}
@Simn
Copy link
Member Author

Simn commented Jun 14, 2020

This is supported now, but we still need tests.

@RealyUniqueName RealyUniqueName added this to the Bugs milestone Jun 15, 2020
@Simn Simn modified the milestones: Bugs, Later Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants