Bug 18591 – DMD should allow access to mixin template declarations

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-03-11T18:21:43Z
Last change time
2018-03-12T04:23:20Z
Assigned to
No Owner
Creator
Seb

Comments

Comment #0 by greensunny12 — 2018-03-11T18:21:43Z
Comment #1 by github-bugzilla — 2018-03-12T02:00:09Z
Commit pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/786bdb338a64fa52b24ab515edf6706b259447de Fix Issue 18591 - Allow getting type from template declarations.
Comment #2 by simen.kjaras — 2018-03-12T04:23:20Z
Issue example from PR: struct TypeObj { alias This = typeof(this); mixin template MixinTempl() { int value; } } ref TypeObj Obj() { static TypeObj a; return a; } void main() { mixin Obj.This.MixinTempl; // ok mixin Obj.MixinTempl; // error: "MixinTempl!()" is not defined }