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

cgen: fix building with -no-preludes -no-builtin -skip-unused (part 2)

This commit is contained in:
Delyan Angelov 2021-12-15 13:30:21 +02:00
parent 2ce1647ea0
commit 1a6899e85e
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -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