On Wednesday, 6 August 2025 at 23:58:03 UTC, monkyyy wrote:
```d
struct A(T) {}
struct H(T) {}

alias B(T) = A!(H!T);

void f(T)(A!(H!T) b) {}
void g(T)(A!T b) {}
void h(B_)(B_ b)if(is(B_==A!(H!T),T)){}
unittest{
    f(B!string.init);
    g(B!int.init);
    h(B!bool.init);
}
```

I dont think you should actually try to pull patterns out of `h`, and just go with a `void i(T...)(T args)` if you have something complex to match but without a usecase, who knows

I don't want to change function parameter to `A!...` because `A!...` is implementation details of `B`:
```d
// module a
public struct A(T) {}

// module b
private struct H(T) {}
public alias B(T) = A!(H!T);

// module main
void f(T)(B!T b) {}
```

Reply via email to