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

remove freetype references everywhere

This commit is contained in:
Alexander Medvednikov
2020-08-06 17:23:54 +02:00
parent 863cf8af60
commit ea76a33b43
3 changed files with 18 additions and 15 deletions

View File

@ -9,6 +9,7 @@ pub const (
#flag windows -I @VROOT/thirdparty/freetype/include
#flag windows -L @VROOT/thirdparty/freetype/win64
/*
#flag linux -I/usr/include/freetype2
#flag darwin -I/usr/local/include/freetype2
// MacPorts
@ -22,6 +23,7 @@ pub const (
#flag darwin -lfreetype
#flag darwin -lpng -lbz2 -lz
*/
#flag linux -I.

View File

@ -362,6 +362,9 @@ pub fn (mut c Checker) struct_init(mut struct_init ast.StructInit) table.Type {
}
struct_init.typ = c.expected_type
}
if struct_init.typ == 0 {
c.error('unknown type', struct_init.pos)
}
type_sym := c.table.get_type_symbol(struct_init.typ)
if type_sym.kind == .sum_type && struct_init.fields.len == 1 {
sexpr := struct_init.fields[0].expr.str()