prevent to check for final attribs inside templates
since they might be mixed or not, in structs or not
This commit is contained in:
parent
1ee033392c
commit
7686dd0ecc
|
@ -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