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

Add typetrace(t) for returning the recursive supertypes of Type t #34718

Closed
wants to merge 8 commits into from

Conversation

IanButterworth
Copy link
Member

A simple function that might be useful-enough to put in base?
From a discussion with @DilumAluthge and @dpsanders on slack

julia> typetrace(Int32)
"Int32 <: Signed <: Integer <: Real <: Number <: Any"

julia> typetrace(Int32, returnarray=true)
6-element Array{DataType,1}:
 Any    
 Number 
 Real   
 Integer
 Signed 
 Int32  

I can add tests & documentation if there's interest

@IanButterworth
Copy link
Member Author

Perhaps supertypetrace is a better name?

@KristofferC
Copy link
Member

KristofferC commented Feb 10, 2020

Already implemented in #34419?

@IanButterworth
Copy link
Member Author

Ah, damn. Forgot to check master..

@IanButterworth IanButterworth deleted the typetrace branch July 14, 2020 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants