diff --git a/plutus-core/plutus-ir/test/PlutusIR/Generators/QuickCheck/Tests.hs b/plutus-core/plutus-ir/test/PlutusIR/Generators/QuickCheck/Tests.hs index 7fd3c02a149..c346a861ebc 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Generators/QuickCheck/Tests.hs +++ b/plutus-core/plutus-ir/test/PlutusIR/Generators/QuickCheck/Tests.hs @@ -210,7 +210,8 @@ noStructuralErrors term = prop_noStructuralErrors :: Property prop_noStructuralErrors = withMaxSuccess 99 $ forAllDoc "ty,tm" genTypeAndTerm_ shrinkClosedTypedTerm $ \(_, termPir) -> ioProperty $ do - termUPlc <- fmap UPLC._progTerm . modifyError throw . toUPlc $ Program () latestVersion termPir + termUPlc <- fmap UPLC._progTerm . modifyError (userError . displayException) . toUPlc $ + Program () latestVersion termPir noStructuralErrors termUPlc -- | Test that evaluation of an ill-typed terms fails with a structural error.