Reset parent on cached TypeInfo values if we need to.

This commit is contained in:
Alexandros Naskos
2018-04-26 14:29:27 +03:00
parent bb56360bfa
commit 7a91e4736a
2 changed files with 53 additions and 7 deletions

View File

@@ -6348,7 +6348,6 @@ static void define_builtin_compile_vars(CodeGen *g) {
buf_appendf(contents, "};\n\n");
}
{
// @TODO Add method info where methods are supported.
// @TODO Add Namespace info.
buf_appendf(contents,
"pub const TypeInfo = union(TypeId) {\n"
@@ -6449,6 +6448,7 @@ static void define_builtin_compile_vars(CodeGen *g) {
" layout: ContainerLayout,\n"
" tag_type: Int,\n"
" fields: []EnumField,\n"
" methods: []Method,\n"
" };\n"
"\n"
" pub const UnionField = struct {\n"
@@ -6461,6 +6461,7 @@ static void define_builtin_compile_vars(CodeGen *g) {
" layout: ContainerLayout,\n"
" tag_type: ?Enum,\n"
" fields: []UnionField,\n"
" methods: []Method,\n"
" };\n"
"\n"
" pub const CallingConvention = enum {\n"