From: Brendan Hansen Date: Wed, 30 Dec 2020 16:26:14 +0000 (-0600) Subject: updated CHANGELOG X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=9c66b193b80f6ef3e2165ab643440b4252afc8d6;p=onyx.git updated CHANGELOG --- diff --git a/CHANGELOG b/CHANGELOG index 66563b91..20ede32f 100644 --- 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 diff --git a/docs/todo b/docs/todo index d6d7ed07..8bcd3ee2 100644 --- 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 4d1f1a5c..0445ec27 100755 Binary files a/onyx and b/onyx differ diff --git a/src/onyxsymres.c b/src/onyxsymres.c index 6718dfb6..95d7e4bf 100644 --- a/src/onyxsymres.c +++ b/src/onyxsymres.c @@ -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; }