You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import typetraits
import timn/util
type
A =object
B =object
C[T] =objecttypeMyInt=inttypeC2=C
typeA2=A
echoA2# A; (case_A2)typeMyInt2=intechoMyInt2# MyInt2 # case_MyInt2 BUG=> should be int (otherwise inconsistent with case_A2)typeMyInt3=MyInt2echoMyInt3# MyInt2 ; mixing rules case_A2 and case_MyInt2...type MyInt_distinct =distinctintecho MyInt_distinct # MyInt_distinct: ok, it's a distinct typeechoC2# C2 BUG=> should be C (otherwise inconsistent with case_A2)echoC2[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
introduce a new typedesc.nameResolved that use that typeResolved
not sure what should be the behavior of typedesc.name ; it may be useful to keep aliased name around (eg BiggestInt, UnsignedInteger etc) as they may carry semantic info in their name, but some adjustments are needed as current behavior is definitely buggy (eg [typetraits] echo A[B] prints differently depending on unrelated code #8569 + some inconsistencies above)
then, in error messages, show type T.name aka T.nameResolved (as done in clang)
The text was updated successfully, but these errors were encountered:
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:
extractGeneric(Foo2[float, string], 0) is float
#8554 to have a proc that resolves a type to a concrete type => typeResolvedC2[MyInt] | C2[float]
=>C[int] | C[float]
typedesc.nameResolved
that use thattypeResolved
typedesc.name
; it may be useful to keep aliased name around (eg BiggestInt, UnsignedInteger etc) as they may carry semantic info in their name, but some adjustments are needed as current behavior is definitely buggy (eg [typetraits]echo A[B]
prints differently depending on unrelated code #8569 + some inconsistencies above)T.name
akaT.nameResolved
(as done in clang)The text was updated successfully, but these errors were encountered: