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 400
    • Issues 400
    • 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
  • #1636
Closed
Open
Created Sep 08, 2004 by Robert Bernecky@rbeDeveloper

Typecasting in SAC considered bizarre

Bugzilla Link 52
Created on Sep 08, 2004 16:57
Resolution FIXED
Resolved on Nov 24, 2005 17:02
Version 1.00beta
OS Linux
Architecture PC
Attachments bugtypecast.sac

Extended Description

I have a problem understanding the role of typecasts in SAC,
and specifically, the idea that all empty arrays are integer.
We know there are different types of empty arrays:
Existence proof:
    - empty egg cartons
    - vacant stares
    - empty milk crates
 
I was unable to perform a type-case of an empty list:
print ((:char[0])a_e);
It produces this:
 bugtypecast.sac:14:ERROR: element types of cast-type and expr-type should
                    :ERROR: be identical; types found: char[0]  and
                    :ERROR: int[0]{[0]} !
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking