From f290c11163f332b351d78c8837abe744aa87229b Mon Sep 17 00:00:00 2001 From: Alex Turner Date: Tue, 22 Aug 2023 20:49:35 +0000 Subject: [PATCH] Spec: Fix a broken assert Instead of asserting, we should return a default value to match the implementation. --- spec.bs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/spec.bs b/spec.bs index 3ed4b01..470869f 100644 --- a/spec.bs +++ b/spec.bs @@ -436,12 +436,11 @@ To append an entry to the contribution cache given a 1. [=list/Append=] |entry| to the [=contribution cache=]. To get a debug details given a [=debug scope=] -|debugScope|: +|debugScope|, perform the following steps. They return a [=debug details=]. 1. Let |debugScopeMap| be the [=debug scope map=]. -1. [=Assert=]: |debugScopeMap|[|debugScope|] [=map/exists=]. - - Issue: This should return a default when the scope does not exist. -1. Return |debugScopeMap|[|debugScope|]. +1. If |debugScopeMap|[|debugScope|] [=map/exists=], return + |debugScopeMap|[|debugScope|]. +1. Otherwise, return a new [=debug details=]. To mark a debug scope complete given a [=debug scope=] |debugScope|: