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

compiler: fix struct order bug

This commit is contained in:
Alexander Medvednikov
2019-08-28 17:35:44 +03:00
parent f29079daac
commit 5b1700e52a
4 changed files with 117 additions and 90 deletions

View File

@ -44,6 +44,7 @@ enum AccessMod {
}
enum TypeCategory {
builtin
struct_
func
interface_ // 2
@ -901,3 +902,12 @@ fn (fit &FileImportTable) is_aliased(mod string) bool {
fn (fit &FileImportTable) resolve_alias(alias string) string {
return fit.imports[alias]
}
fn (t &Type) contains_field_type(typ string) bool {
for field in t.fields {
if field.typ == typ {
return true
}
}
return false
}