diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-06-08 12:37:07 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-06-08 12:37:07 +0100 |
| commit | 13deb4706c37acbababc6f60a1b6ec58c630a3f5 (patch) | |
| tree | 764e98b0b49f111fd8a33ae5cc3a80070e1a0231 /src/check_decl.cpp | |
| parent | 9b61adb97dd78e1cf04ad410e72166f684f97925 (diff) | |
Update `String` to use overloading
Diffstat (limited to 'src/check_decl.cpp')
| -rw-r--r-- | src/check_decl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp index f31434c01..f8c74c0be 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -274,7 +274,7 @@ void check_proc_lit(Checker *c, Entity *e, DeclInfo *d) { bool is_require_results = (pd->tags & ProcTag_require_results) != 0; - if (d->scope->is_file && str_eq(e->token.string, str_lit("main"))) { + if (d->scope->is_file && e->token.string == "main") { if (proc_type != NULL) { TypeProc *pt = &proc_type->Proc; if (pt->param_count != 0 || @@ -334,7 +334,7 @@ void check_proc_lit(Checker *c, Entity *e, DeclInfo *d) { String name = foreign_library->Ident.string; Entity *found = scope_lookup_entity(c->context.scope, name); if (found == NULL) { - if (str_eq(name, str_lit("_"))) { + if (name == "_") { error_node(foreign_library, "`_` cannot be used as a value type"); } else { error_node(foreign_library, "Undeclared name: %.*s", LIT(name)); |