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 394
    • Issues 394
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 19
    • Merge requests 19
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Wiki
  • Propsals ideas
  • Better error messages

Better error messages · Changes

Page history
Add start of Better-error-messages.md proposal and Type-pattern-errors.md authored Mar 06, 2025 by Quinten Cabo's avatar Quinten Cabo
Hide whitespace changes
Inline Side-by-side
propsals-ideas/Better-error-messages.md 0 → 100644
View page @ 5354689a
This file holds the error messages that have been improved or added.
# Starting functions with _
This was actually an error that should have been raised, but it did not.
The message for invalid function names simply reads: `invalid function name `%s' found`.
I added a specific case for when a function name written by the programmer starts with an _
A [MR](https://gitlab.sac-home.org/sac-group/sac2c/-/merge_requests/362) was made for this but maybe its not the best solution to the problem of compiler generated functions.
## On a function call:
Sorry, but only primitive functions are allowed to start with an _ (underscore) character. The name '%s' does not look like a primitive function application. Please remove the underscore.
## On a function definition:
Sorry, but function definition names are not allowed to start with an _ (underscore) character, but your '%s' function starts with an underscore. Please remove it.
\ No newline at end of file
Clone repository
  • concepts
    • Deprecated Modules
    • Globals
    • Named Tuples
    • Overloading
    • Preprocessor
    • Primitive functions
    • Runetime Representations
    • input stdin
    • phm xt
    • ref counting methods
    • type famlies
    • type patterns
  • error messages
    • Anthropomorphic error essages
    • Colored error messages
    • Empty file error
View All Pages