updated CHANGELOG
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Wed, 30 Dec 2020 16:26:14 +0000 (10:26 -0600)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Wed, 30 Dec 2020 16:26:14 +0000 (10:26 -0600)
CHANGELOG
docs/todo
onyx
src/onyxsymres.c

index 66563b91e0b597f0f3f9080c6be93e01f6982be3..20ede32f728be66c5af5cb12035e68ec69a6cefc 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
 Release v0.0.6
 --------------
 Additions:
+* #solidify directive for explicitly specifying type variables in polymorphic procs.
 * properly different kinds of allocators in core/alloc/.
 * `map.empty`
 * `string.compare`
@@ -10,8 +11,14 @@ Additions:
 * `map.update`
 
 Removals:
+* struct literals can no longer specify values for members brought in through a `use`.
 
 Changes:
+* `::` declarations in a procedure are treated differently now. They used to represent a constant
+    value, but one that was still computed at the assignment site. Now, they instead are used to
+    declare top level expressions in the procedure scope. This means that things like structs and
+    enums can be declared at any block scope. The top-level expressions currently do not have
+    access to polymoprhic variables in the procedure.
 * enum values are compile time known.
 * struct literals are compile time known can be used at top level scope.
 * range literals are proper things in the compiler code now.
@@ -20,6 +27,7 @@ Changes:
 Bug fixes:
 * polymorphic procedures would get 'confused' when two structs in the program had the same name.
 * function argument type mismatch would give wrong function name.
+* `structs` with `use`d members caused all sorts of problems.
 
 
 Release v0.0.5
index d6d7ed0740f23e35d979229609d89d917274d2cf..8bcd3ee2f7ce3f50cdd07c88375711e8a9a17cbc 100644 (file)
--- a/docs/todo
+++ b/docs/todo
@@ -68,7 +68,7 @@ Language Cohesion:
         is that 'use package' can only be at the top level, and 'use' can only
         be used at the block level.
         
-    [ ] :: should not declare a local variable, just bind a name to an expression.
+    [X] :: should not declare a local variable, just bind a name to an expression.
         They can still be lexically scoped.
 
     [X] Currently accessing a field directly on a function call produces invalid
diff --git a/onyx b/onyx
index 4d1f1a5c10d23e7c7f443e998ec27d30953d3c7a..0445ec27d27aa100c3fff70681c0ddc42216771a 100755 (executable)
Binary files a/onyx and b/onyx differ
index 6718dfb64e5cc8f661bb940c559806b24d4a003c..95d7e4bf07af56a89a5c32cf7bf391dfaf30b070 100644 (file)
@@ -869,14 +869,14 @@ static void symres_enum(AstEnumType* enum_node) {
                 return;
             }
 
-            (*value)->value->type = enum_node->backing_type;
+            (*value)->value->type = enum_node->etcache;
 
         } else {
             AstNumLit* num = onyx_ast_node_new(semstate.node_allocator, sizeof(AstNumLit), Ast_Kind_NumLit);
             num->value.l = next_assign_value;
             num->flags |= Ast_Flag_Comptime;
             num->type = enum_node->etcache;
-            
+
             (*value)->value = num;
         }