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

Detect transitive casts #11041

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

RblSb
Copy link
Member

@RblSb RblSb commented Mar 27, 2023

Sorry for spending your attention here for silly stuff, basically i wanted to solve this todo somehow:
https://github.com/vshaxe/haxe-language-server/blob/314183133ce3d593b11c702dcd3fada276a3c1d9/src/haxeLanguageServer/protocol/Extensions.hx#L65
So i tried to get abstract type param name (like T1) and check abstract from/to casts, and then build bool list if type parameter from ct_params list is in from/to, and can be resolved in completion.
So completion will work better with params in instances of
abstract EitherType<T1, T2>(Dynamic) from T1 to T1 from T2 to T2 {}
and in stuff like
abstract EitherType3<T1, T2, T3>(Dynamic) from T1 to T1 from T2 to T2 from T3 to T3 {}
Just interested if there can be less ugly solution and if i understand type casting correctly.

@Simn Simn added this to the Later milestone Mar 28, 2023
@skial skial mentioned this pull request Mar 29, 2023
1 task
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 this pull request may close these issues.

2 participants