Skip to content

Commit 9ee2397

Browse files
committed
make test case fail if counting fails
1 parent 54e8813 commit 9ee2397

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

SRC/typecheck-infer-expr.lsts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ let std-infer-expr(tctx: Maybe<TypeContext>, term: AST, is-scoped: Bool, used: I
195195
(tctx, short-right) = std-infer-expr(tctx, short-right, false, Used, ta);
196196
let lt = denormalize-strong(typeof-term(short-left).slot(c"Type",1).l1);
197197
let rt = denormalize-strong(typeof-term(short-right).slot(c"Type",1).l1);
198+
print("\{typeof-term(short-left)} <: \{typeof-term(short-right)}\n");
198199
if non-zero(lt) and non-zero(rt) {
199200
if can-unify(rt, lt) {
200201
(tctx, short-circuit) = std-infer-expr(tctx, t, false, Tail, ta);

tests/promises/meta/generic-retain-release.lsts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import lib/core/baremetal.lsts;
33
import lib/core/one-owned-data.lsts;
44

55
type List<x> implies MustRetain, MustRelease zero LEOF = LEOF | LCons { head: x, tail: OneOwnedData<List<x>>[] };
6+
let $"list::cons"(hd: x, tl: List<x>): List<x> = LCons(hd, close(tl));
67

78
let .retain(x: xt): xt = (
89
for case in $cases-of(x) {
@@ -47,8 +48,5 @@ let .release(x: xt): Nil = (
4748
};
4849
);
4950

50-
let x = [] : List<U8>;
51-
x.retain;
52-
print(c"Retained\n");
53-
x.release;
54-
print(c"Released\n");
51+
[1];
52+
assert( safe-alloc-block-count == 0 );

0 commit comments

Comments
 (0)