IntersectMBO / plutus

The Plutus language implementation and tools
Apache License 2.0
1.55k stars 466 forks source link

[Bug] Fix 'isNormalType' and add 'prop_normalizedTypeIsNormal' #6272

Open effectfully opened 1 day ago

effectfully commented 1 day ago

This fixes a bug in isNormalType and adds a test. Without the bug fixed the test fails with

  PlutusCore.Generators.QuickCheck
    TypesTests
      normalizedTypeIsNormal: FAIL
        *** Failed! 'normalizeType' returned a non-normal type (after 8 tests and 1 shrink):
        k,ty = (*, list unit)

as expected.

Resolves #6033.