updated windows-build.yml
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Thu, 8 Apr 2021 17:58:11 +0000 (12:58 -0500)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Thu, 8 Apr 2021 17:58:11 +0000 (12:58 -0500)
.github/workflows/windows-build.yml
core/stdio.onyx
examples/05_slices.onyx
src/onyxutils.c

index 206d4ec7402414c911d21aef4b7ff023e07c2c48..eb476574db24b7f3a7593c90516ff61bb5c22f62 100644 (file)
@@ -31,3 +31,9 @@ jobs:
       # Runs a single command using the runners shell
       - name: Build a release build
         run: cmd.exe /c 'build.bat 1'
+
+      - name: Upload executable file
+        uses: actions/upload-artifact@v2
+        with:
+          name: executable
+          path: onyx.exe
index 81a983699dd95e9cfc405aca92cc440e2f2294eb..86569be3a69200993f9d12f666a2580505a6532a 100644 (file)
@@ -7,9 +7,6 @@ package core
 // in anyway.
 
 
-// It is expected that a file will be included that will be part
-// of the system package
-
 use package runtime as runtime
 #if runtime.Runtime == runtime.Runtime_Custom {
     #error "'stdio' can only be included in the 'wasi' or 'js' runtime."
index bc2649cda6652490757b7c71884407517a167532..d9046a39ec6e574fba2d4de277b4ef51939c674a 100644 (file)
@@ -26,7 +26,7 @@ main :: (args: [] cstr) {
     for elem: slice do printf("%i ", elem);
     print("\n");
 
-    // Another equivalent way of writing lines 21 and 22 is to
+    // Another equivalent way of writing lines 22 and 23 is to
     // use the array subscript notation, but provide a range for
     // the index as so. This is generally called the slice literal
     // notation.
index 91de1ac0c6a4d7dc6bf803d78636769a517da24e..84f0709237ab0a76eb6434112a5507514f7aed2b 100644 (file)
@@ -458,6 +458,9 @@ static PolySolveResult solve_poly_type(AstNode* target, AstType* type_expr, Type
                 bh_arr_push(elem_queue, ((PolySolveElem) {
                     .type_expr = (AstType*) ((AstArrayType *) elem.type_expr)->count_expr,
                     .kind = PSK_Value,
+
+                    // CLEANUP: Making an integer literal every time is very very very gross. This should
+                    // at least be cached or something.
                     .value = (AstTyped *) make_int_literal(context.ast_alloc, elem.actual->Array.count)
                 }));