Merge pull request #398 from BBasile/fix-finalattrib
prevent to check for final attribs inside templates
This commit is contained in:
commit
5f40f5ac9f
|
@ -110,6 +110,16 @@ public:
|
||||||
_parent = saved;
|
_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)
|
override void visit(const(Declaration) d)
|
||||||
{
|
{
|
||||||
const Parent savedParent = _parent;
|
const Parent savedParent = _parent;
|
||||||
|
@ -266,6 +276,13 @@ public:
|
||||||
}
|
}
|
||||||
}, sac);
|
}, sac);
|
||||||
|
|
||||||
|
assertAnalyzerWarnings(q{
|
||||||
|
mixin template Impl()
|
||||||
|
{
|
||||||
|
protected final void mixin_template_can() {}
|
||||||
|
}
|
||||||
|
}, sac);
|
||||||
|
|
||||||
// fail
|
// fail
|
||||||
|
|
||||||
assertAnalyzerWarnings(q{
|
assertAnalyzerWarnings(q{
|
||||||
|
|
Loading…
Reference in New Issue