Skip to content

Error: internal error: getTypeDescAux(tyFromExpr) when using auto + arc, works with refc #20588

@arkanoid87

Description

@arkanoid87

What happened?

# works with --gc:refc
# Error: internal error: getTypeDescAux(tyFromExpr) with --gc:arc

func hakunaMatata[N, D](n: N, d: D): auto =
    if d.float > 0: (n/d) else: 0.0.auto

echo hakunaMatata(42.0, 0.42)

Nim Version

Nim Compiler Version 1.6.8 [Linux: amd64]
Compiled at 2022-09-27
Copyright (c) 2006-2021 by Andreas Rumpf

git hash: c9f46ca8c9eeca8b5f68591b1abe14b962f80a4c
active boot switches: -d:release

Current Standard Output Logs

Error: internal error: getTypeDescAux(tyFromExpr)
No stack traceback available

Expected Standard Output Logs

100.0

Possible Solution

No response

Additional Information

No response

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