Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[typetraits] type names should resolve to name of resolved type; currently, not consistent #8570

Closed
timotheecour opened this issue Aug 8, 2018 · 3 comments · Fixed by #11678

Comments

@timotheecour
Copy link
Member

timotheecour commented Aug 8, 2018

import typetraits
import timn/util

type
  A = object
  B = object
  C[T] = object

type MyInt = int
type C2=C

type A2=A
echo A2 # A; (case_A2)

type MyInt2 = int
echo MyInt2 # MyInt2 # case_MyInt2 BUG=> should be int (otherwise inconsistent with case_A2)

type MyInt3 = MyInt2
echo MyInt3 # MyInt2 ; mixing rules case_A2 and case_MyInt2...

type MyInt_distinct = distinct int
echo MyInt_distinct # MyInt_distinct: ok, it's a distinct type

echo C2 # C2 BUG=> should be C (otherwise inconsistent with case_A2)
echo C2[MyInt] # C2[t01_resolveTypeName.MyInt]

NOTE: related but not identical to #8569 ; although if this bug gets fixed by resolving type names to name of resolved type, then #8569 would automatically get fixed

proposal:

@kaushalmodi
Copy link
Contributor

Is this the same bug: #7976?

@timotheecour
Copy link
Member Author

actually no, but definitely #7976 is instead very related to #8569 (continuing #7976 related discussion there)

@ghost
Copy link

ghost commented Aug 10, 2018

I think it's the same or at least related to #8083

Araq pushed a commit that referenced this issue Aug 31, 2019
…8569 #8083  #8570 (#11678)

* nested typeToString
* typeToString: preferResolved
* add test
* fix test
* preferMixed
* fix tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants