✓
Passing This code compiles and runs correctly.
Code
// PINS: a unary minus in front of a row reference, and the kebab name that
// must NOT be broken by allowing it.
//
// Kebab-case makes `-` an IDENTIFIER character, so every text rewriter's
// left-boundary test — "the byte before is not an identifier char" — reads
// `-r.v` as the interior of a name like `foo-r` and declines to rewrite. The
// reference then reached the host verbatim as `-r.v`, where `r` does not
// exist: a generated-code error naming a Koru binding, raised against a
// program that is correct Koru.
//
// The only spelling that worked was `- r.v`, WITH A SPACE. Whitespace carries
// no meaning inside an expression in this language, so an author has no reason
// to suspect it and no way to find it.
//
// The disambiguation is local and total, and both halves are pinned here
// because a fix to either one alone is wrong:
//
// - a `-` belongs to an identifier only when it sits BETWEEN two identifier
// characters, so `-r.v` and `2 * -r.v` both read the column;
// - `twice-r` is ONE name. Its trailing `r` is preceded by `-`, which is
// preceded by `e`, so it must stay untouched. A fix that simply treated
// every `-` as a boundary would rewrite it into the column read and break
// every kebab name whose last segment collides with a row binding.
// It is called as a CHAIN STEP: a tor call inside an envelope value is not
// a spelling the store lowers, and reaches the host verbatim.
//
// Found by the ECS benchmark's bevy_strength_world port, whose bounce arm
// writes `-d.vx * 0.8` — the plainest way anyone would spell a reflection.
import std/io
import std/store
std/store:new(cells, capacity: 3) { v: i64 }
tor twice-r { x: i64 } -> i64
twice-r -> x * 2
std/store:insert(cells) { v: 5 }
std/store:insert(cells) { v: -3 }
std/store:query(cells)
! query r |> std/store:stored { r.v: -r.v * 2 }
std/store:query(cells)
! query r |> std/store:stored { r.v: 2 * -r.v }
std/store:query(cells)
! query r |> twice-r(x: r.v): d |> std/store:stored { r.v: d }
std/store:query(cells)
! query r |> std/io:print.ln("v {{ r.v:d }}")
Supporting Files
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v8.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v8.0": {
"a_cs_equiv/1.0.0": {
"runtime": {
"a_cs_equiv.dll": {}
}
}
}
},
"libraries": {
"a_cs_equiv/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}{
"runtimeOptions": {
"tfm": "net8.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0"
},
"configProperties": {
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}v 40
v -24
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>
<AssemblyName>a_cs_equiv</AssemblyName>
<WarningLevel>0</WarningLevel>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
</PropertyGroup>
<ItemGroup>
<Compile Include="output_emitted.cs" />
</ItemGroup>
</Project>
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("a_cs_equiv")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+73ba11db56be006bccd0e336c10b98e84afb8a8a")]
[assembly: System.Reflection.AssemblyProductAttribute("a_cs_equiv")]
[assembly: System.Reflection.AssemblyTitleAttribute("a_cs_equiv")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generated by the MSBuild WriteCodeFragment class.
781bcb8eb7f6067e092418577e860799fe5cda0e2c63b7711dbb724cd1e01e1a
is_global = true
build_property.TargetFramework = net8.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = koru
build_property.ProjectDir = /Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.EffectiveAnalysisLevelStyle = 8.0
build_property.EnableCodeStyleSeverity =
5be0995b741828a5c320155d1f80abdffa79d05541ea191d12e3a61e37fca459
/Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/obj/Debug/net8.0/koru.GeneratedMSBuildEditorConfig.editorconfig
/Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/obj/Debug/net8.0/koru.AssemblyInfoInputs.cache
/Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/obj/Debug/net8.0/koru.AssemblyInfo.cs
/Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/obj/Debug/net8.0/koru.csproj.CoreCompileInputs.cache
/Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/obj/Debug/net8.0/koru.sourcelink.json
/Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/a_cs_equiv
/Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/obj/Debug/net8.0/a_cs_equiv.dll
/Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/obj/Debug/net8.0/refint/a_cs_equiv.dll
/Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/obj/Debug/net8.0/a_cs_equiv.pdb
/Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/a_cs_equiv.deps.json
/Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/obj/Debug/net8.0/koru.genruntimeconfig.cache
/Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/a_cs_equiv.runtimeconfig.json
/Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/a_cs_equiv.dll
/Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/obj/Debug/net8.0/ref/a_cs_equiv.dll
/Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/a_cs_equiv.pdb
f020c04dba85d23966162dc4f0cd7d7aa964e9ec1d6f6b440305b8f8a3937098
{"documents":{"/Users/larsde/src/koru/*":"https://raw.githubusercontent.com/korulang/koru/73ba11db56be006bccd0e336c10b98e84afb8a8a/*"}}{
"format": 1,
"restore": {
"/Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/koru.csproj": {}
},
"projects": {
"/Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/koru.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/koru.csproj",
"projectName": "a_cs_equiv",
"projectPath": "/Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/koru.csproj",
"packagesPath": "/Users/larsde/.nuget/packages/",
"outputPath": "/Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/Users/larsde/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"net8.0"
],
"sources": {
"/opt/homebrew/Cellar/dotnet/9.0.0/libexec/library-packs": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net8.0": {
"targetAlias": "net8.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "all"
},
"SdkAnalysisLevel": "9.0.100"
},
"frameworks": {
"net8.0": {
"targetAlias": "net8.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[8.0.11, 8.0.11]"
},
{
"name": "Microsoft.NETCore.App.Host.osx-arm64",
"version": "[8.0.11, 8.0.11]"
},
{
"name": "Microsoft.NETCore.App.Ref",
"version": "[8.0.11, 8.0.11]"
}
],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/opt/homebrew/Cellar/dotnet/9.0.0/libexec/sdk/9.0.100/PortableRuntimeIdentifierGraph.json"
}
}
}
}
}<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/Users/larsde/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/Users/larsde/.nuget/packages/</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.12.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="/Users/larsde/.nuget/packages/" />
</ItemGroup>
</Project><?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />{
"version": 3,
"targets": {
"net8.0": {}
},
"libraries": {},
"projectFileDependencyGroups": {
"net8.0": []
},
"packageFolders": {
"/Users/larsde/.nuget/packages/": {}
},
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/koru.csproj",
"projectName": "a_cs_equiv",
"projectPath": "/Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/koru.csproj",
"packagesPath": "/Users/larsde/.nuget/packages/",
"outputPath": "/Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/Users/larsde/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"net8.0"
],
"sources": {
"/opt/homebrew/Cellar/dotnet/9.0.0/libexec/library-packs": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net8.0": {
"targetAlias": "net8.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "all"
},
"SdkAnalysisLevel": "9.0.100"
},
"frameworks": {
"net8.0": {
"targetAlias": "net8.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[8.0.11, 8.0.11]"
},
{
"name": "Microsoft.NETCore.App.Host.osx-arm64",
"version": "[8.0.11, 8.0.11]"
},
{
"name": "Microsoft.NETCore.App.Ref",
"version": "[8.0.11, 8.0.11]"
}
],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/opt/homebrew/Cellar/dotnet/9.0.0/libexec/sdk/9.0.100/PortableRuntimeIdentifierGraph.json"
}
}
}
}{
"version": 2,
"dgSpecHash": "HAWgwafk+8U=",
"success": true,
"projectFilePath": "/Users/larsde/src/koru/tests/regression/600_STDLIB/690_STORE/690_244_unary_minus_before_a_row_reference/koru.csproj",
"expectedPackageFiles": [
"/Users/larsde/.nuget/packages/microsoft.netcore.app.ref/8.0.11/microsoft.netcore.app.ref.8.0.11.nupkg.sha512",
"/Users/larsde/.nuget/packages/microsoft.aspnetcore.app.ref/8.0.11/microsoft.aspnetcore.app.ref.8.0.11.nupkg.sha512",
"/Users/larsde/.nuget/packages/microsoft.netcore.app.host.osx-arm64/8.0.11/microsoft.netcore.app.host.osx-arm64.8.0.11.nupkg.sha512"
],
"logs": []
}static class main_module {
public static void __koru_stdout_write(dynamic s) => global::System.Console.Out.Write(s);
public static void __koru_stderr_write(dynamic s) => global::System.Console.Error.Write(s);
// The mutable handle carrier — `*String`-style resources are
// `new __KoruBox { data = … }` because C# anonymous types are
// read-only: `s.data = …` (std/string append/clear, handle
// mutation generally) needs a settable member.
public class __KoruBox { public dynamic data; }
// Textification for `{{ … }}` operands: C# bool ToStrings as
// `True` where Koru prints `true`, and the operand's static type
// is unknown at this boundary — a `(x) is bool` inline test would
// be a compile error on statically-typed operands instead. Generic
// on purpose: `dynamic` boxed every value-type operand — measured
// ~1s/10M elements on 012_threat_scanner — while T specializes to
// the operand's own ToString() with no box.
public static string __koru_str<T>(T v) => v is bool b ? (b ? "true" : "false") : v?.ToString();
// std/store: plural store 'cells' created (SoA cell + insert/query/write/take/stripe units); fields v: i64
static class __koru_store_cells {
public static long[] v = new long[3];
public static long len = 0;
public static long __koru_brand = -1;
}
public static class twice_r_event {
public struct Input {
public long x;
}
public static long handler(Input __koru_input) {
var x = __koru_input.x;
return (long)(x * 2);
}
}
public static class __store_insert_cells_event {
public struct Input {
public long v;
public long __site_line;
}
public static dynamic handler(Input __koru_input) {
var v = __koru_input.v;
var __site_line = __koru_input.__site_line;
if (__koru_store_cells.len >= 3) throw new global::System.Exception("std/store: store 'cells' is full (capacity 3) - declared capacity and the `| full` branch are pinned at 690_011");
long __koru_new_row = __koru_store_cells.len;
__koru_store_cells.v[__koru_new_row] = v;
__koru_store_cells.len += 1;
return default;
}
}
public static class __store_apply_cells_event {
public struct Input {
public long row;
public long field;
public long value_0;
}
public struct Output {
public string tag;
public long v;
}
public static Output handler(Input __koru_input) {
var row = __koru_input.row;
var field = __koru_input.field;
var value_0 = __koru_input.value_0;
var __koru_r = row;
switch (field) {
case 0: { __koru_store_cells.v[__koru_r] = value_0; return new Output { tag = "v", v = value_0 }; }
}
throw new global::System.Exception("__store_apply_cells: field index " + field + " is not a column of store 'cells'");
return default;
}
}
public static class __store_write_cells_event {
public struct Input {
public long row;
public long field;
public long value_0;
}
public static dynamic handler(Input __koru_input) {
var row = __koru_input.row;
var field = __koru_input.field;
var value_0 = __koru_input.value_0;
var result_0 = main_module.__store_apply_cells_event.handler(new __store_apply_cells_event.Input { row = (long)(row), field = (long)(field), value_0 = (long)(value_0)});
var _auto_6 = result_0.v;
return default;
}
}
public static class __store_sweepbody_cells_L42_690_244_unary_minus_before_a_row_reference_input_a8a3a1_event {
public struct Input {
public long __koru_sdix_r_L42;
}
public static dynamic handler(Input __koru_input) {
var __koru_sdix_r_L42 = __koru_input.__koru_sdix_r_L42;
main_module.__store_write_cells_event.handler(new __store_write_cells_event.Input { row = (long)(__koru_sdix_r_L42), field = (long)(0), value_0 = (long)(-__koru_store_cells.v[__koru_sdix_r_L42] * 2)});
return default;
}
}
public static class __store_sweeprun_cells_L42_690_244_unary_minus_before_a_row_reference_input_a8a3a1_event {
public struct Input {
}
public static dynamic handler(Input __koru_input) {
{
for (var __koru_si = 0; __koru_si < __koru_store_cells.len; __koru_si++) {
main_module.__store_sweepbody_cells_L42_690_244_unary_minus_before_a_row_reference_input_a8a3a1_event.handler(new main_module.__store_sweepbody_cells_L42_690_244_unary_minus_before_a_row_reference_input_a8a3a1_event.Input { __koru_sdix_r_L42 = __koru_si });
}
}
return default;
}
}
public static class __store_sweepbody_cells_L45_690_244_unary_minus_before_a_row_reference_input_a8a3a1_event {
public struct Input {
public long __koru_sdix_r_L45;
}
public static dynamic handler(Input __koru_input) {
var __koru_sdix_r_L45 = __koru_input.__koru_sdix_r_L45;
main_module.__store_write_cells_event.handler(new __store_write_cells_event.Input { row = (long)(__koru_sdix_r_L45), field = (long)(0), value_0 = (long)(2 * -__koru_store_cells.v[__koru_sdix_r_L45])});
return default;
}
}
public static class __store_sweeprun_cells_L45_690_244_unary_minus_before_a_row_reference_input_a8a3a1_event {
public struct Input {
}
public static dynamic handler(Input __koru_input) {
{
for (var __koru_si = 0; __koru_si < __koru_store_cells.len; __koru_si++) {
main_module.__store_sweepbody_cells_L45_690_244_unary_minus_before_a_row_reference_input_a8a3a1_event.handler(new main_module.__store_sweepbody_cells_L45_690_244_unary_minus_before_a_row_reference_input_a8a3a1_event.Input { __koru_sdix_r_L45 = __koru_si });
}
}
return default;
}
}
public static class __store_sweepbody_cells_L48_690_244_unary_minus_before_a_row_reference_input_a8a3a1_event {
public struct Input {
public long __koru_srf_r_L48_v;
public long __koru_sdix_r_L48;
}
public static dynamic handler(Input __koru_input) {
var __koru_srf_r_L48_v = __koru_input.__koru_srf_r_L48_v;
var __koru_sdix_r_L48 = __koru_input.__koru_sdix_r_L48;
var d = main_module.twice_r_event.handler(new twice_r_event.Input { x = (long)(__koru_srf_r_L48_v)});
main_module.__store_write_cells_event.handler(new __store_write_cells_event.Input { row = (long)(__koru_sdix_r_L48), field = (long)(0), value_0 = (long)(d)});
return default;
}
}
public static class __store_sweeprun_cells_L48_690_244_unary_minus_before_a_row_reference_input_a8a3a1_event {
public struct Input {
}
public static dynamic handler(Input __koru_input) {
{
for (var __koru_si = 0; __koru_si < __koru_store_cells.len; __koru_si++) {
var __koru_srf_r_L48_v = __koru_store_cells.v[__koru_si];
main_module.__store_sweepbody_cells_L48_690_244_unary_minus_before_a_row_reference_input_a8a3a1_event.handler(new main_module.__store_sweepbody_cells_L48_690_244_unary_minus_before_a_row_reference_input_a8a3a1_event.Input { __koru_srf_r_L48_v = __koru_srf_r_L48_v, __koru_sdix_r_L48 = __koru_si });
}
}
return default;
}
}
public static class __store_sweepbody_cells_L51_690_244_unary_minus_before_a_row_reference_input_a8a3a1_event {
public struct Input {
public long __koru_srf_r_L51_v;
public long __koru_sdix_r_L51;
}
public static dynamic handler(Input __koru_input) {
var __koru_srf_r_L51_v = __koru_input.__koru_srf_r_L51_v;
var __koru_sdix_r_L51 = __koru_input.__koru_sdix_r_L51;
__koru_stdout_write("v " + __koru_str(__koru_srf_r_L51_v) + "\n");
return default;
}
}
public static class __store_sweeprun_cells_L51_690_244_unary_minus_before_a_row_reference_input_a8a3a1_event {
public struct Input {
}
public static dynamic handler(Input __koru_input) {
{
for (var __koru_si = 0; __koru_si < __koru_store_cells.len; __koru_si++) {
var __koru_srf_r_L51_v = __koru_store_cells.v[__koru_si];
main_module.__store_sweepbody_cells_L51_690_244_unary_minus_before_a_row_reference_input_a8a3a1_event.handler(new main_module.__store_sweepbody_cells_L51_690_244_unary_minus_before_a_row_reference_input_a8a3a1_event.Input { __koru_srf_r_L51_v = __koru_srf_r_L51_v, __koru_sdix_r_L51 = __koru_si });
}
}
return default;
}
}
public static class std_io_print_ln_event {
public struct Input {
public dynamic expr;
public dynamic invocation;
public dynamic item;
public dynamic program;
public dynamic reporter;
public dynamic allocator;
}
public static dynamic handler(Input __koru_input) {
var expr = __koru_input.expr;
var invocation = __koru_input.invocation;
var item = __koru_input.item;
var program = __koru_input.program;
var reporter = __koru_input.reporter;
var allocator = __koru_input.allocator;
throw new global::System.Exception("ln: [transform] tor is lowered at compile time and must never be called");
}
}
public static void flow0() {
{
var __koru_p_v = (long)(5);
var __koru_p___site_line = (long)(38);
if (__koru_store_cells.len >= 3) throw new global::System.Exception("std/store: store 'cells' is full (capacity 3) - declared capacity and the `| full` branch are pinned at 690_011");
long __koru_new_row = __koru_store_cells.len;
__koru_store_cells.v[__koru_new_row] = __koru_p_v;
__koru_store_cells.len += 1;
}
}
public static void flow1() {
{
var __koru_p_v = (long)(-3);
var __koru_p___site_line = (long)(39);
if (__koru_store_cells.len >= 3) throw new global::System.Exception("std/store: store 'cells' is full (capacity 3) - declared capacity and the `| full` branch are pinned at 690_011");
long __koru_new_row = __koru_store_cells.len;
__koru_store_cells.v[__koru_new_row] = __koru_p_v;
__koru_store_cells.len += 1;
}
}
public static void flow2() {
{
{
for (var __koru_si = 0; __koru_si < __koru_store_cells.len; __koru_si++) {
main_module.__store_sweepbody_cells_L42_690_244_unary_minus_before_a_row_reference_input_a8a3a1_event.handler(new main_module.__store_sweepbody_cells_L42_690_244_unary_minus_before_a_row_reference_input_a8a3a1_event.Input { __koru_sdix_r_L42 = __koru_si });
}
}
}
}
public static void flow3() {
{
{
for (var __koru_si = 0; __koru_si < __koru_store_cells.len; __koru_si++) {
main_module.__store_sweepbody_cells_L45_690_244_unary_minus_before_a_row_reference_input_a8a3a1_event.handler(new main_module.__store_sweepbody_cells_L45_690_244_unary_minus_before_a_row_reference_input_a8a3a1_event.Input { __koru_sdix_r_L45 = __koru_si });
}
}
}
}
public static void flow4() {
{
{
for (var __koru_si = 0; __koru_si < __koru_store_cells.len; __koru_si++) {
var __koru_srf_r_L48_v = __koru_store_cells.v[__koru_si];
main_module.__store_sweepbody_cells_L48_690_244_unary_minus_before_a_row_reference_input_a8a3a1_event.handler(new main_module.__store_sweepbody_cells_L48_690_244_unary_minus_before_a_row_reference_input_a8a3a1_event.Input { __koru_srf_r_L48_v = __koru_srf_r_L48_v, __koru_sdix_r_L48 = __koru_si });
}
}
}
}
public static void flow5() {
{
{
for (var __koru_si = 0; __koru_si < __koru_store_cells.len; __koru_si++) {
var __koru_srf_r_L51_v = __koru_store_cells.v[__koru_si];
main_module.__store_sweepbody_cells_L51_690_244_unary_minus_before_a_row_reference_input_a8a3a1_event.handler(new main_module.__store_sweepbody_cells_L51_690_244_unary_minus_before_a_row_reference_input_a8a3a1_event.Input { __koru_srf_r_L51_v = __koru_srf_r_L51_v, __koru_sdix_r_L51 = __koru_si });
}
}
}
}
}
static class Program {
static void Main() {
main_module.flow0();
main_module.flow1();
main_module.flow2();
main_module.flow3();
main_module.flow4();
main_module.flow5();
}
}
Actual
v 40
v -24
Expected output
✓ Zig✓ C#v 40
v -24
Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (cells, capacity: 3, source: v: i64)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (cells, source: v: 5)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (cells, source: v: -3)
flow ~query click a branch to expand · @labels scroll to their anchor
query (cells)
flow ~query click a branch to expand · @labels scroll to their anchor
query (cells)
flow ~query click a branch to expand · @labels scroll to their anchor
query (cells)
flow ~query click a branch to expand · @labels scroll to their anchor
query (cells)
Test Configuration
MUST_RUN LANGUAGES: zig cs