You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
copilot-core: Test property purports to test type size but instead tests type length #784
The test property copilot-core:Test.Copilot.Core.Type.testTypeSize1 claims, in its name, in the Haddock comment that accompanies it, and in the property description as part of the property group, that it tests typeSize. However, its implementation tests typeLength.
The property should test the function it is expected to be testing.
Type
Bug: Property does not actually test desired functionality.
Additional context
None.
Requester
Ivan Perez.
Method to check presence of bug
It can be checked by visual examination of the module copilot-core:Test.Copilot.Core.Type and, specifically, the Haddock comment and the property description that accompany testTypeSize1, as well as its code. The property description indicates:
, testProperty "typeSize matches full array size for 1-dimensional arrays"
testTypeSize1
The haddock comment consistently indicates:
--| Test that the size of an array is as expected.
However, the implementation reads:
testTypeSize1 = property $ typeLength a ==3
Expected result
All property names, descriptions and comments in copilot-core are consistent with the functionality they test.
Desired result
The property copilot-core:Test.Copilot.Core.Type.testTypeSize1 actually tests typeSize.
Proposed solution
Modify copilot-core:Test.Copilot.Core.Type.testTypeSize1 to use typeSize instead of typeLength.
The solution proposed produces the expected result. Details:
Evaluated by visual inspection of the changes, checking, specifically, that the property in question, testTypeSize1, uses typeSize and not typeLength.
Implementation is documented. Details:
No updates needed; change is internal to a property and made in part to match existing documentation.
Change history is clear.
Commit messages are clear.
Changelogs are updated.
Examples are updated. Details:
No updates needed; change is to the tests and does not affect existing examples.
Author is internal or has provided signed CLA.
Required version bumps are evaluated. Details:
Bump not needed; change is to the tests and does not affect public API.
Activity
ivanperez-keera commentedon Oct 18, 2026
Change Manager: Confirmed that the issue exists.
ivanperez-keera commentedon Oct 18, 2026
Technical Lead: Confirmed that the issue should be addressed.
ivanperez-keera commentedon Oct 18, 2026
Technical Lead: Issue scheduled for fixing in Copilot 4.8.2.
Fix assigned to: @ivanperez-keera.
copilot-core: Fix test to use `typeSize` instead of `typeLength`. Refs …
copilot-core: Document changes in CHANGELOG. Refs Copilot-Language#784.
ivanperez-keera commentedon Oct 18, 2026
Implementor: Solution implemented, review requested.
ivanperez-keera commentedon Oct 18, 2026
Change Manager: Verified that:
Build log: https://app.travis-ci.com/github/Copilot-Language/copilot/builds/279013831
Evaluated by visual inspection of the changes, checking, specifically, that the property in question,
testTypeSize1, usestypeSizeand nottypeLength.No updates needed; change is internal to a property and made in part to match existing documentation.
No updates needed; change is to the tests and does not affect existing examples.
Bump not needed; change is to the tests and does not affect public API.
ivanperez-keera commentedon Oct 18, 2026
Change Manager: Implementation ready to be merged.
Merge branch 'develop-fix-core-test-size'. Close Copilot-Language#784.