diff options
| author | Alexandros Naskos <alex_naskos@hotmail.com> | 2018-04-27 02:05:24 +0300 |
|---|---|---|
| committer | Alexandros Naskos <alex_naskos@hotmail.com> | 2018-04-27 02:05:24 +0300 |
| commit | 9041d0d37e59e3f07d568f93bd680cc0065d1cd2 (patch) | |
| tree | 4b7c40c312a751f994dddd259c41e074c2e9c0b6 /src/codegen.cpp | |
| parent | 884e32d5c3aac470cdcd9b20e15554d6193f5501 (diff) | |
| download | zig-9041d0d37e59e3f07d568f93bd680cc0065d1cd2.tar.gz zig-9041d0d37e59e3f07d568f93bd680cc0065d1cd2.zip | |
Fixed enum tag type detection in TypeInfo generation.
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp index 77794c2ab9..b6236197cc 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -6349,6 +6349,12 @@ static void define_builtin_compile_vars(CodeGen *g) { } { // @TODO Add Namespace info. + // @TODO Methods -> definitions + // @TODO Includes type definitions (name + type bound) + functions + const variable definitions (+ type of variable) + // @TODO Type definitions are defined as variable definitions of type 'type' + // @TODO This should give us everything available. + // @TODO An alternative is exposing the value of every variable definition, check out if it's possible and wether we want that. + // @TODO I don't think so, @field gives it to us for free. buf_appendf(contents, "pub const TypeInfo = union(TypeId) {\n" " Type: void,\n" @@ -6453,7 +6459,7 @@ static void define_builtin_compile_vars(CodeGen *g) { "\n" " pub const UnionField = struct {\n" " name: []const u8,\n" - " enum_field: EnumField,\n" + " enum_field: ?EnumField,\n" " field_type: type,\n" " };\n" "\n" |
