Skip to content

typetraits.name behaves unexpected #8083

@ghost

Description

import typetraits

type A = object
type B = int
type C = A

let b = 1.B
let c = C()
echo b.type.name #B
echo c.type.name #A

I expected either

echo b.type.name #B
echo c.type.name #C

or

echo b.type.name #int
echo c.type.name #A

I would prefer the first result, since the second can be found out without the usage of typetraits with a is int etc (assuming this doesn't use typetraits).

Nim version: 0.18.0 win64

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