slint-ui / slint

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

Previewer and compiler crash when aliasing a callback to itself #4938

Closed sgued closed 6 months ago

sgued commented 6 months ago

This simple code, which should fail to compile, instead crashes slint-viewer

export component Test inherits Window {
    callback test <=> test;
}

Error message:

thread 'main' panicked at internal/compiler/passes/resolving.rs:1522:29:
assertion failed: diag.has_error()

Version 1.5.1 on linux.

ogoffart commented 6 months ago

Thanks for the bug report! Fixing in https://github.com/slint-ui/slint/pull/4946