Skip to content

Commit 8d79313

Browse files
committed
remove wildcard
1 parent ef0a920 commit 8d79313

File tree

2 files changed

+6
-3
lines changed
  • plutus-core/untyped-plutus-core

2 files changed

+6
-3
lines changed

plutus-core/untyped-plutus-core/src/UntypedPlutusCore/Transform/CaseApply.hs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ processNestedApp (Apply ann body arg) =
3434
if length args >= 3
3535
then
3636
Case ann
37-
(Constr ann 0 (processNestedApp <$> args))
37+
(Constr ann 0 args)
3838
(V.singleton (processNestedApp innerBody))
3939
else Apply ann (processNestedApp body) (processNestedApp arg)
4040
where
@@ -51,4 +51,7 @@ processNestedApp (Constr ann idx ts) =
5151
Constr ann idx (processNestedApp <$> ts)
5252
processNestedApp (Case ann t bs) =
5353
Case ann (processNestedApp t) (processNestedApp <$> bs)
54-
processNestedApp t = t
54+
processNestedApp (Var ann n) = Var ann n
55+
processNestedApp (Constant ann v) = Constant ann v
56+
processNestedApp (Builtin ann fun) = Builtin ann fun
57+
processNestedApp (Error ann) = Error ann

plutus-core/untyped-plutus-core/testlib/Scoping/Spec.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ test_names = testGroup "names"
8181
(evalSimplifierT . caseReduce)
8282
, T.test_scopingGood "case-apply"
8383
(genTerm @DefaultFun)
84-
T.BindingRemovalOk
84+
T.BindingRemovalNotOk
8585
T.PrerenameYes
8686
(evalSimplifierT . caseApply)
8787
, -- CSE creates entirely new names, which isn't supported by the scoping check machinery.

0 commit comments

Comments
 (0)