跳到內容

classrules

本頁內容尚未翻譯。

def ClassRules.definitions (items : List Item) : List (String * ClassDefinition)

The class definitions among the items, by name.

def ClassRules.definition (classes : List (String * ClassDefinition)) (x : String) : Option ClassDefinition

The definition of a class of a name.

def ClassRules.repeatedBase (seen : List String) (bs : List Base) : Option String

The first name repeated among a class’s direct bases.

def ClassRules.declaresVirtual (classes : List (String * ClassDefinition)) (aliases : List (String * TypeSyntax)) (cannotThrow : Bool) (fuel : Nat) (x : String) (key : String) : Bool

Whether a class (or a base of it, within fuel levels) declares a member function of an identity that is virtual, and, when cannotThrow, declared noexcept too.

def ClassRules.inBases (classes : List (String * ClassDefinition)) (aliases : List (String * TypeSyntax)) (cannotThrow : Bool) (bs : List Base) (key : String) : Bool

Whether any base of a class (within fuel levels) declares a virtual member function of an identity (that cannot throw, when cannotThrow).

def ClassRules.overriding (classes : List (String * ClassDefinition)) (aliases : List (String * TypeSyntax)) (bs : List Base) (ms : List Member) : Option (NodeId * String)

The first member function of a class that breaks a rule on overriding: marked override without overriding, or overriding a function that cannot throw without being noexcept itself.

def ClassRules.handlerReturn (ms : List Member) : Option NodeId

The first return in a handler of a constructor’s function-try-block.

def ClassRules.violation (items : List Item) : Option (NodeId * String)

The first class definition among the items that breaks a rule, with its node and why.