dlang-community / D-Scanner

Swiss-army knife for D source code
Boost Software License 1.0
242 stars 80 forks source link

Adds an check for `@disable`d functions that have an body; closes #897 #898

Closed Mai-Lapyst closed 1 year ago

Mai-Lapyst commented 1 year ago

This PR adds an check for functions (and also con-/destructors) that have the @disable attribute and also have a body:

class C1
{
        @disable this() {}
        @disable { this() {} }
        this() @disable {}

        @disable void doThing() {}
        @disable doThing() {}
        @disable { void doThing() {} }
        void doThing() @disable {}

        @disable ~this() {}
        @disable { ~this() {} }
        ~this() @disable {} 
}