From 32fec2c26c82050acdae64baa31040778c9d483e Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Fri, 8 Nov 2019 23:28:32 +0300 Subject: [PATCH] fix interfaces on msvc --- vlib/compiler/cgen.v | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vlib/compiler/cgen.v b/vlib/compiler/cgen.v index ba220acc44..00a1b78cf9 100644 --- a/vlib/compiler/cgen.v +++ b/vlib/compiler/cgen.v @@ -410,6 +410,9 @@ fn (v &V) interface_table() string { // Speaker_Cat_index = 0 sb.writeln('int _${t.name}_${gen_type}_index = $i;') } + if t.methods.len == 0 { + methods = '{TCCSKIP(0)}' + } sb.writeln('void* (* ${t.name}_name_table[][$t.methods.len]) = ' + '{ $methods }; ') continue