slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
17.72k stars 615 forks source link

VSCode language server panic in resolving.rs #5652

Closed mitchgrout closed 4 months ago

mitchgrout commented 4 months ago

VSCode extension for slint crashed while editing a .slint file. Extension version was v1.7.0, and the error output:

thread 'main' panicked at internal\compiler\passes\resolving.rs:169:13:
assertion failed: ctx.diag.has_errors()

This was triggered by creating a preview for the following component:

import { Button } from "std-widgets.slint";

export component ExportedComponent {
  width: 80px;
  height: 60px;
  Button { }
}

...then in the preview, enabling the editor, selecting the button, and setting the ~value~ accessible-action-set-value property to :. I haven't checked all possibilities, but it seems that anything that isn't strictly letters will cause a panic.

image

ogoffart commented 4 months ago

Thanks for reporting a bug.

I can reproduce it in slintpad as well.

There are two problem: