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

pull/12853/head
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
1 changed files with 4 additions and 0 deletions

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_ { if isym.kind != .interface_ {
continue 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 interface_info := isym.info as ast.Interface
if interface_info.methods.len == 0 { if interface_info.methods.len == 0 {
continue continue