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

Missing type parameter info when return type inferred from interface #11624

Closed
kLabz opened this issue Apr 3, 2024 · 1 comment · Fixed by #11658
Closed

Missing type parameter info when return type inferred from interface #11624

kLabz opened this issue Apr 3, 2024 · 1 comment · Fixed by #11658
Milestone

Comments

@kLabz
Copy link
Contributor

kLabz commented Apr 3, 2024

Hxb makes the issue visible when compiling this through compilation server:

interface Foo {
	function foo<T>():T;
	function bar<T>():T;
	function baz<T>():T;
}

class Bar implements Foo {
	public function foo() return null; // Warning: Unbound type parameter foo.T
	public function bar<T>() return null; // Error: write_full_path hxb writer failure
	public function baz<T>():T return null; // this is fine
}

While looking at what's happening (and so far failing addressing this issue...), I saw that cf_type was TFun([], TMono (Some (TAbstract(Null, [TMono (Some (TInst(T, [])))])))), with that T not having cl_kind = KTypeParameter ttp.

@Simn
Copy link
Member

Simn commented Apr 22, 2024

This is very much related to #11411. At this point I'm convinced that valid_redefinition needs a complete rewrite, but doing so requires a very particular state of being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants