gdext icon indicating copy to clipboard operation
gdext copied to clipboard

Improvement expected behaviour for #[export]

Open snatvb opened this issue 8 months ago • 9 comments

If user tries convert @export_file("*.txt") to Array:

extends Node

class_name NewScript

@export_file("*.txt") var files: Array[String]

LSP shows error: image And in console: image

But if user does it in rust:

#[derive(GodotClass)]
#[class(init, base=Node)]
struct Foo {
    base: Base<Node>,
    #[export(file)]
    resources: Array<GString>,
}

#[godot_api]
impl INode for Foo {}

It leads to this: image image

For user it's unexpected and it would be rather to notify about incorrect annotation.

Reprocase: godot-rust-repro.zip

Discord source conversation

snatvb avatar Jun 19 '24 18:06 snatvb