Skip to content

[Bug] Nested Types, Constants are not autocompleted if they are preceded by an incomplete if #1227

@BigBoyBarney

Description

@BigBoyBarney

Hi!

The following code snippet illustrates the issue. I have a feeling this might not be easy 😰

test :: proc () {
	pokemon: Snorlax
	if // pokemon does not appear as an autocomplete here, because Snorlax is invalid due to the incomplete if
	
	Snorlax :: struct {}
}
Image Image

This issue does not require the Type to be directly under the incomplete if.

Image Everything is "invalid" until the `if` is closed, and nothing is autocompleted.

A "solution" is to close the incomplete if with {}, but it's somewhat cumbersome to do.

Image

I'm not too hopeful about this, so feel free to close this issue if it's impossible, but I thought I'd mention it regardless.

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions