aboutsummaryrefslogtreecommitdiff
path: root/src/checker/types.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2016-10-26 20:10:32 +0100
committerGinger Bill <bill@gingerbill.org>2016-10-26 20:10:32 +0100
commit09f39ae2ccea78ecd37facc5431c51e4c9666630 (patch)
treeb42adb2c539be81df9e1d48be19f7c4713fe01c7 /src/checker/types.cpp
parentaed7a83f5b8e812b3c2c31bdf745a3107da80190 (diff)
Better constant strings for SSA; Fix Type_Info
Diffstat (limited to 'src/checker/types.cpp')
-rw-r--r--src/checker/types.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/checker/types.cpp b/src/checker/types.cpp
index c606f189c..e216e556d 100644
--- a/src/checker/types.cpp
+++ b/src/checker/types.cpp
@@ -1347,7 +1347,7 @@ gbString write_type_to_string(gbString str, Type *type) {
for (isize i = 1; i < type->Record.field_count; i++) {
Entity *f = type->Record.fields[i];
GB_ASSERT(f->kind == Entity_TypeName);
- if (i > 0) {
+ if (i > 1) {
str = gb_string_appendc(str, "; ");
}
str = gb_string_append_length(str, f->token.string.text, f->token.string.len);
@@ -1362,8 +1362,9 @@ gbString write_type_to_string(gbString str, Type *type) {
for (isize i = 0; i < type->Record.field_count; i++) {
Entity *f = type->Record.fields[i];
GB_ASSERT(f->kind == Entity_Variable);
- if (i > 0)
+ if (i > 0) {
str = gb_string_appendc(str, ", ");
+ }
str = gb_string_append_length(str, f->token.string.text, f->token.string.len);
str = gb_string_appendc(str, ": ");
str = write_type_to_string(str, f->type);