From: Brendan Hansen Date: Tue, 28 Mar 2023 02:20:29 +0000 (-0500) Subject: bugfix: polymorphic-structs error; onyx package X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=c8d361da5dfd673d45589eeeb5e2de7df0d95d9d;p=onyx.git bugfix: polymorphic-structs error; onyx package --- diff --git a/compiler/src/polymorph.h b/compiler/src/polymorph.h index 7abab457..bf43378e 100644 --- a/compiler/src/polymorph.h +++ b/compiler/src/polymorph.h @@ -1100,8 +1100,9 @@ char* build_poly_struct_name(AstPolyStructType* ps_type, Type* cs_type) { } Type* polymorphic_struct_lookup(AstPolyStructType* ps_type, bh_arr(AstPolySolution) slns, OnyxFilePos pos, b32 error_if_failed) { - // @Cleanup - assert(ps_type->scope != NULL); + if (ps_type->scope == NULL) { + return NULL; + } if (ps_type->concrete_structs == NULL) { sh_new_arena(ps_type->concrete_structs); diff --git a/scripts/onyx-pkg.onyx b/scripts/onyx-pkg.onyx index 4f9809d9..c96a803d 100644 --- a/scripts/onyx-pkg.onyx +++ b/scripts/onyx-pkg.onyx @@ -16,7 +16,8 @@ Version :: SemVer.{0, 1, 1} -use core +use core {package, *} +use runtime global_arguments: struct { #tag "--config-file"