Fixed issues inferring length with subarrays. Removed old, non-working example. Infer length in the case of subarray literals.

This commit is contained in:
Christoffer Lerno
2023-09-12 22:24:20 +02:00
parent d61482dffc
commit 1d04b70efe
9 changed files with 61 additions and 81 deletions

View File

@@ -1,35 +0,0 @@
module globals;
const String CLICK_ME = "Click Me";
uint counter = 0;
fn void clickedme(GtkButton *o, void *d)
{
(GtkLabel*)(d).set_text(string.format("You clicked me %d times", ++counter));
}
fn void main(String[] argv)
{
gtk::init(&argc, &argv);
GtkWindow *win = gtk::windowCreate(GtkWindow.TOPLEVEL);
win.set_title(CLICK_ME);
GtkButton *button = gtk::buttonCreateWithLabel(CLICK_ME);
GtkLabel *label = GtkLabel.new("There have been no clicks yet");
label.setSingleLineMode(true);
GtkVBox vbox = gtk::vBoxCreate(true, 1);
vbox.add(label);
vbox.add(button);
win.add(vbox);
win.connectSignal("delete-event", gtk::mainQuit, NULL);
button.connectSignal("clicked", &clickedme, label);
win.showAll();
gtk::main();
}