Skip to content

{.inline.} destructors don't compile under --gc:refc #16732

@alaviss

Description

@alaviss

Example

type O = object

proc `=destroy`(o: var O) {.inline.} = discard

discard (ref O)()

Current Output

Error: the destructor that is turned into a finalizer needs to have the 'nimcall' calling convention

Additional Information

  • Works on --gc:arc and its variants
$ nim -v
Nim Compiler Version 1.5.1 [Linux: amd64]
Compiled at 2021-01-15
Copyright (c) 2006-2021 by Andreas Rumpf

git hash: 7b632f9ccbd4d15fa9fe4ca45b6fea22b259c81d
active boot switches: -d:release -d:nimUseLinenoise

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions