Skip to content

Prevent double variadic wrapping when inferring ...#709

Open
taminomara wants to merge 1 commit intoEmmyLuaLs:mainfrom
taminomara:prevent-double-variadics
Open

Prevent double variadic wrapping when inferring ...#709
taminomara wants to merge 1 commit intoEmmyLuaLs:mainfrom
taminomara:prevent-double-variadics

Conversation

@taminomara
Copy link
Contributor

This prevents situation when ... is annotated as variadic (@param ... T...), and its type is inferred as (T...)...

This prevents situation when `...` is annotated as variadic
(`@param ... T...`), and its type is inferred as `(T...)...`
"#,
);
let a_ty = get_type_of_first_local_assign(&mut ws, file_id);
assert_eq!(&ws.humanize_type(a_ty), "T[]");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the intended usage.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, but I'm not sure how to compare types properly without hardcoding GenericTplIds?

@taminomara
Copy link
Contributor Author

Ping?

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