diff --git a/src/analysis/final_attribute.d b/src/analysis/final_attribute.d index 89ae0ec7..8abde68e 100644 --- a/src/analysis/final_attribute.d +++ b/src/analysis/final_attribute.d @@ -110,6 +110,16 @@ public: _parent = saved; } + override void visit(const(MixinTemplateDeclaration) mtd) + { + // can't really know where it'll be mixed (class |final class | struct ?) + } + + override void visit(const(TemplateDeclaration) mtd) + { + // regular template are also mixable + } + override void visit(const(Declaration) d) { const Parent savedParent = _parent; @@ -266,6 +276,13 @@ public: } }, sac); + assertAnalyzerWarnings(q{ + mixin template Impl() + { + protected final void mixin_template_can() {} + } + }, sac); + // fail assertAnalyzerWarnings(q{