Open sethaxen opened 1 year ago
Yeah, it's on Dim{<:AbstractArray}
.
For better or worse. The reason was because dims are used for so many things it's a potential footgun having lookup
return contents. So it will only ever return something indexable, usually a Lookup
.
val
gives you the contents of the Dimension whatever it is. So does Base.parent
.
Clearly this all happened in various phases as changes were made (with no PR reviews), and I was never totally happy with it. But that's how it works...
What threw me off is that val(Dim{:foo}())
works but lookup(Dim{:foo}())
doesn't while val(Dim{:foo})
doesn't work while lookup(Dim{:foo})
does.
I think that lookup
on Dim{:foo}
should be lookup_type
Cases like this fail. I think though that they should work?