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 403
    • Issues 403
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #1277
Closed
Open
Created May 05, 2015 by Sven-Bodo Scholz@sbsOwner

WLSIMP elides type relevant generators without adding type_conv

Bugzilla Link 1157
Created on May 05, 2015 20:47
Version svn
OS All
Architecture PC
Attachments bug1157.wlt.sac, bug1157.nostdlib.sac

Extended Description

This bug is related to 1147.
Consider the following code:
module crud;
export {g};
int[.] g( int[0] a, int[+] b)
{
  res = with {
         ( [0] <= iv < _shape_A_(a)): _sel_VxA_( iv, a);
        } : modarray( b);
  return res;
}
Despite being empty, the generator conveys the info that res in fact is a vector (int[.]).
Once the empty generator is elided, this info is gone and the type checker complains that it no longer can infer int[.] but reverts to int[+] instead......
Whenever we elide a generator we need to insert a type assertion, i.e., 
rather than replacing the above with 
res = with {} : modarry(b);
we need to replace it by
res' = with {} : modarry(b);
res = type_conv( res', int[.]);
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking