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

LightScopeOf Doesn't See Through Layers of Templates #86

Open
jmh530 opened this issue Mar 22, 2023 · 0 comments
Open

LightScopeOf Doesn't See Through Layers of Templates #86

jmh530 opened this issue Mar 22, 2023 · 0 comments

Comments

@jmh530
Copy link
Contributor

jmh530 commented Mar 22, 2023

I have a referenced-counted stairs object that I want to pass to another function. It requires calling lightScope on it to strip the RC context. I think the way to do that is to make sure that LightScopeOf works for it, but it looks like when the iterator is a StairsIterator, then LightScopeOf just returns the same type. Ideally it should just be a simple fix to adjust how LightScopeOf works to get working.

unittest {
    import mir.ndslice.iterator: StairsIterator;
    import mir.qualifier: LightScopeOf;
    import mir.rc: RCI;

    static assert(is(LightScopeOf!(StairsIterator!(RCI!double, "+")) == StairsIterator!(RCI!double, "+"))); //passes but shouldn't (ideally)
    static assert(is(LightScopeOf!(StairsIterator!(RCI!double, "+")) == StairsIterator!(double, "+"))); //fails, but should pass (ideally)
}
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

No branches or pull requests

1 participant