diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-07-02 22:08:39 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-07-02 22:08:39 +0100 |
| commit | bc16b290ba6c2168baf1153b4c7691e679f68b46 (patch) | |
| tree | b18d799bde62c727111f042c0813a18e362e674a /src/checker.cpp | |
| parent | 96d32680fe1b83ec943382efb8e91c7029f0621f (diff) | |
Disable polymorphic overloading in the global scope
TODO: Figure out why it does not work in the global scope
Diffstat (limited to 'src/checker.cpp')
| -rw-r--r-- | src/checker.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/checker.cpp b/src/checker.cpp index 84f5ad02d..8c692080a 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -44,8 +44,6 @@ enum BuiltinProcId { BuiltinProc_compile_assert, - BuiltinProc_copy, - BuiltinProc_swizzle, BuiltinProc_complex, @@ -92,8 +90,6 @@ gb_global BuiltinProc builtin_procs[BuiltinProc_COUNT] = { {STR_LIT("compile_assert"), 1, false, Expr_Expr}, - {STR_LIT("copy"), 2, false, Expr_Expr}, - {STR_LIT("swizzle"), 1, true, Expr_Expr}, {STR_LIT("complex"), 2, false, Expr_Expr}, @@ -204,6 +200,7 @@ struct ProcedureInfo { Type * type; // Type_Procedure AstNode * body; // AstNode_BlockStmt u64 tags; + bool generated_from_polymorphic; }; // ExprInfo stores information used for "untyped" expressions @@ -241,6 +238,16 @@ struct Scope { }; gb_global Scope *universal_scope = NULL; +void scope_reset(Scope *scope) { + if (scope == NULL) return; + + scope->first_child = NULL; + scope->last_child = NULL; + map_clear (&scope->elements); + map_clear (&scope->implicit); + array_clear(&scope->shared); + array_clear(&scope->imported); +} struct DelayedDecl { |