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:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user