[Issue 7721] Nested template loses context when mixin'd

2020-02-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7721

Simen Kjaeraas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Simen Kjaeraas  ---
Fixed in 2.087.1.

--


[Issue 7721] Nested template loses context when mixin'd

2018-02-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7721

Simen Kjaeraas  changed:

   What|Removed |Added

Summary|Loss of template context|Nested template loses
   |when passed as template |context when mixin'd
   |template parameter  |

--- Comment #1 from Simen Kjaeraas  ---
Simplified example showing template template parameters are unnecessary to
trigger this bug:

template Bar(T) {
template Baz() {
T n;
}
}

unittest {
// Works.
Bar!int.Baz!().n = 3;
// Fails: foo.d(3): Error: undefined identifier T
mixin Bar!int.Baz!();
}

--