From 1a6899e85e01dd21fd907ab2bf474394a1f3803b Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Wed, 15 Dec 2021 13:30:21 +0200 Subject: [PATCH] cgen: fix building with `-no-preludes -no-builtin -skip-unused` (part 2) --- vlib/v/markused/markused.v | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vlib/v/markused/markused.v b/vlib/v/markused/markused.v index 1642047440..5d0102efd1 100644 --- a/vlib/v/markused/markused.v +++ b/vlib/v/markused/markused.v @@ -260,6 +260,10 @@ pub fn mark_used(mut table ast.Table, pref &pref.Preferences, ast_files []&ast.F if isym.kind != .interface_ { continue } + if isym.info !is ast.Interface { + // Do not remove this check, isym.info could be &IError. + continue + } interface_info := isym.info as ast.Interface if interface_info.methods.len == 0 { continue