From 06b2bb870958963933d3c29a0cbb42fa2abe54c6 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Sat, 6 Sep 2025 09:24:51 -0300 Subject: [PATCH] fix --- vlib/v/gen/c/cgen.v | 2 +- vlib/veb/controller.v | 2 +- vlib/veb/veb.v | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/vlib/v/gen/c/cgen.v b/vlib/v/gen/c/cgen.v index c1e0368510..a0df96913a 100644 --- a/vlib/v/gen/c/cgen.v +++ b/vlib/v/gen/c/cgen.v @@ -4206,7 +4206,7 @@ fn (mut g Gen) selector_expr(node ast.SelectorExpr) { } unwrapped_expr_type := g.unwrap_generic(node.expr_type) - sym := g.table.sym(unwrapped_expr_type) + sym := g.table.final_sym(unwrapped_expr_type) field_name := if sym.language == .v { c_name(node.field_name) } else { node.field_name } is_as_cast := node.expr is ast.AsCast if is_as_cast { diff --git a/vlib/veb/controller.v b/vlib/veb/controller.v index c9e485d831..ae6dfdce77 100644 --- a/vlib/veb/controller.v +++ b/vlib/veb/controller.v @@ -75,7 +75,7 @@ fn check_duplicate_routes_in_controllers[T](global_app &T, routes map[string]Rou mut controllers_sorted := []&ControllerPath{} $if T is ControllerInterface { mut paths := []string{} - controllers_sorted = ControllerInterface(global_app).controllers.clone() + controllers_sorted = global_app.controllers.clone() controllers_sorted.sort(a.path.len > b.path.len) for controller in controllers_sorted { if controller.host == '' { diff --git a/vlib/veb/veb.v b/vlib/veb/veb.v index db71de18d1..00a59fd416 100644 --- a/vlib/veb/veb.v +++ b/vlib/veb/veb.v @@ -865,19 +865,19 @@ fn serve_if_static[A, X](app &A, mut user_context X, url urllib.URL, host string } if asked_path.ends_with('/') { - if StaticApp(app).static_files[asked_path + 'index.html'] != '' { + if app.static_files[asked_path + 'index.html'] != '' { asked_path += 'index.html' - } else if StaticApp(app).static_files[asked_path + 'index.htm'] != '' { + } else if app.static_files[asked_path + 'index.htm'] != '' { asked_path += 'index.htm' } } - static_file := StaticApp(app).static_files[asked_path] or { return false } + static_file := app.static_files[asked_path] or { return false } // StaticHandler ensures that the mime type exists on either the App or in veb ext := os.file_ext(static_file).to_lower() - mut mime_type := StaticApp(app).static_mime_types[ext] or { mime_types[ext] } + mut mime_type := app.static_mime_types[ext] or { mime_types[ext] } - static_host := StaticApp(app).static_hosts[asked_path] or { '' } + static_host := app.static_hosts[asked_path] or { '' } if static_file == '' || mime_type == '' { return false }