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 15
    • Merge requests 15
  • 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
  • !177

fix for issue #2294

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Sven-Bodo Scholz requested to merge sbs/sac2c:hotfix-2294 into develop Feb 15, 2022
  • Overview 0
  • Commits 1
  • Changes 7

The key change is that we now treat F_type_error like F_dispatch_error. This entails replicating the arguments of a function to F_type_error in case the type error replaces the function call in wrapper functions. That way, there will be no reference-counting induced elimination of global objects which tridggered this bug.

The initial change relates to the actual wrapper code generation in new_types.c. Once this was done, we needed to make sure such type-error arguments survive subsequent type inferences, more precisely: subsequent calls to eliminate-bottom-types. Finally, the reference counting had to learn that F_type_error like F_dispatch_error conceptually consumes all its arguments.

Finally, I added a test case.

Fixes #2294 (closed)

Edited Feb 16, 2022 by Hans-Nikolai Viessmann
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: hotfix-2294