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

Cannot assign number to cpos. #10

Open
Mailaender opened this issue Feb 25, 2023 · 4 comments
Open

Cannot assign number to cpos. #10

Mailaender opened this issue Feb 25, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@Mailaender
Copy link
Member

image

@Mailaender Mailaender added the bug Something isn't working label Feb 25, 2023
@Mailaender Mailaender reopened this Feb 25, 2023
@penev92
Copy link
Member

penev92 commented Feb 25, 2023

Should be noted that the issue here is that apparently the language server can't tell what the type of ExtractionPath[2] is and does unknown + cvec -> number. Replacing ExtractionPath[2] with something that is explicitly cpos fixes the warning because as of #7 we support the following operations:

---@operator add(cvec): cpos
---@operator sub(cvec): cpos
---@operator add(wvec): wpos
---@operator sub(wvec): wpos

@Mailaender
Copy link
Member Author

Confirmed that

image

fixes it. However it knows about the types

image

so this is an upstream limitation.

@penev92
Copy link
Member

penev92 commented Feb 25, 2023

Yeah, that sucks ☹️

@Mailaender
Copy link
Member Author

Fixed those manually in OpenRA/OpenRA#20698.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants