bscotch / stitch

Tools and apps for GameMaker development: a CLI for pipeline development, a VSCode extension for coding, and more.
Other
111 stars 13 forks source link

@type causes undeclared system #248

Closed softwareantics closed 2 months ago

softwareantics commented 2 months ago

Take the following scenario:

/// @instancevar {Real} foo

/// @type {Id.Socket}
/// @description The bar.
bar = undefined;

_func = function()
{
    foo = 0;
}

This causes an error that shows:

Undeclared symbol foo

Also in some scenarios it also shows

Struct literal shorthand requires an existing variable named "foo"

adam-coster commented 2 months ago

I can't replicate this. When I paste that sample code into an object I get the expected hovers and no errors. There must be some additional context causing this.

https://github.com/user-attachments/assets/ec7ae6a1-49a9-4cda-b55d-8782a14e6d28

adam-coster commented 2 months ago

Closing for now. Please re-open if you have additional context I can use to try to replicate it!