Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Commit 8045a6a

Browse files
committed
fix test for with-default-read-tc
1 parent b715869 commit 8045a6a

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

pact-tests/Pact/Core/Test/TypecheckerTests.hs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,12 +491,13 @@ expectedNativeTypes = M.fromList . go
491491
, (Field "bar", TyString)]
492492
rv = RowVariable 0 "row"
493493
CoreWithDefaultRead ->
494-
[ ("use-with-default-read", NotIndexed $ TypeScheme [rv] [constr1] (TyTable (RowVar rv) :~> TyObject (RowVar rv) :~> TyInt))
494+
[ ("use-with-default-read", NotIndexed $ TypeScheme [rv1, rv2] [constr1, constr2] (TyTable (RowVar rv1) :~> TyObject (RowVar rv2) :~> TyInt))
495495
, ("tbl1", NotIndexed $ NonGeneric $ TyTable (RowConcrete sc1))
496496
, ("tbl2", NotIndexed $ NonGeneric $ TyTable (RowConcrete sc2))
497497
, ("invoke-with-default-read", NotIndexed $ NonGeneric $ TyNullary TyInt) ]
498498
where
499-
constr1 = RoseSubRow (RoseConcrete subRowScm) (RoseVar rv)
499+
constr1 = RoseSubRow (RoseConcrete subRowScm) (RoseVar rv2)
500+
constr2 = RoseSubRow (RoseVar rv2) (RoseVar rv1)
500501
subRowScm = M.fromList
501502
[ (Field "foo", TyInt)
502503
]
@@ -506,7 +507,8 @@ expectedNativeTypes = M.fromList . go
506507
sc2 = M.fromList
507508
[ (Field "foo", TyInt)
508509
, (Field "bar", TyString)]
509-
rv = RowVariable 0 "row"
510+
rv1 = RowVariable 1 "row1"
511+
rv2 = RowVariable 0 "row2"
510512
CoreWithRead ->
511513
[ ("use-with-read", NotIndexed $ TypeScheme [rv] [constr1] (TyTable (RowVar rv) :~> TyInt))
512514
, ("tbl1", NotIndexed $ NonGeneric $ TyTable (RowConcrete sc1))

pact-tests/pact-tests/tc.repl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,4 +410,5 @@
410410
foo-callable-impl)
411411
)
412412

413-
(typecheck "foo-callable-impl")
413+
(typecheck "foo-callable-impl")
414+
(commit-tx)

0 commit comments

Comments
 (0)