Class AppropriateBodyOrError

java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.common.AppropriateBodyOrError
All Implemented Interfaces:
BiConsumer<MethodSymbol, EK9Parser.OperationDetailsContext>

public class AppropriateBodyOrError extends RuleSupport implements BiConsumer<MethodSymbol, EK9Parser.OperationDetailsContext>
Checks if the body of a method/operator is appropriate. i.e. has it been marked as abstract or default - neither of which should have a body. Emits compiler error if inappropriate. Note: DEFAULT_ONLY_FOR_CONSTRUCTORS checks for 'default' on non-constructors (runs first). This checks for 'default' constructors with bodies (which should use default implementation).