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

Shape inspections incorrectly occuring on type cast shapes #14

Closed
dcorbin opened this issue Aug 4, 2020 · 1 comment
Closed

Shape inspections incorrectly occuring on type cast shapes #14

dcorbin opened this issue Aug 4, 2020 · 1 comment

Comments

@dcorbin
Copy link

dcorbin commented Aug 4, 2020

Environment

name version
IDEA version 2020.2
Luanalysis version 1.03
OS macOs 10.15.6

What are the steps to reproduce this issue?

  1. Run Inspect Code against his file:
---@alias VArgs std__Packed<any>

local result = --[[---@type std__Packed<any> ]] {n = 0}
local result = --[[---@type VArgs ]] {n = 0}

What happens?

The cast on the last line appears to have no effect, and and error is shown

What were you expecting to happen?

The aliased type should behave the same as the original

@Benjamin-Dobell Benjamin-Dobell changed the title @aliased type is not the same as actual type Shape inspections incorrectly occuring on type cast shapes Aug 6, 2020
@Benjamin-Dobell
Copy link
Owner

The description for this issue was a bit off as the type cast was correctly occurring:

Screen Shot 2020-08-07 at 1 47 04 am

It was a bit more complicated, and to-do with the functionality that provides inspections on table literals being assigned to a shape type. Although, the alias was involved in the example above, it'd occur in other circumstances too.

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

No branches or pull requests

2 participants