1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

checker: allow EnumName(number) casts only inside unsafe{} blocks (#15932)

This commit is contained in:
Swastik Baranwal
2022-10-03 01:09:11 +05:30
committed by GitHub
parent 7993f0bf39
commit b584e1df98
32 changed files with 129 additions and 97 deletions

View File

@@ -134,10 +134,10 @@ fn on_event(e &gg.Event, mut app App) {
app.gg.quit()
}
.up {
app.sel = Selection(math.max(0, int(app.sel) - 1))
app.sel = unsafe { Selection(math.max(0, int(app.sel) - 1)) }
}
.down {
app.sel = Selection(math.min(int(Selection.len) - 1, int(app.sel) + 1))
app.sel = unsafe { Selection(math.min(int(Selection.len) - 1, int(app.sel) + 1)) }
}
.left {
match app.sel {