Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 393
    • Issues 393
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 24
    • Merge requests 24
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Merge requests
  • !274

Fix incorrect type pattern dim calculation

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Jordy Aaldering requested to merge 2374-type-pattern-dim-calc into develop Feb 01, 2024
  • Overview 0
  • Commits 2
  • Changes 2

In issue 2374 we found that the dimensionality computation was being incorrectly generated in cases where there are more than two variable-rank features in a single arguments. The dimensionality of these other features were being subtracted from each other, whereas they should have been added.

For example, consider a type pattern:

int[x:_,y:_,z:_] a

With the example from the test, where x and y are 1 The value z was being incorrectly computed as:

z == dim(a) - (x - y) = 2 - (1 - 1) = 2 - 0 = 2

Although it should actually be:

z == dim(a) - (x + y) = 2 - (1 + 1) = 2 - 2 = 0

Closes #2374 (closed)

Edited Feb 01, 2024 by Jordy Aaldering
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: 2374-type-pattern-dim-calc