MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / verifyNoWrite

Method verifyNoWrite

src/ast/ast_lint.cpp:729–737  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

727 }
728 }
729 void verifyNoWrite ( ExprCallFunc * expr ) {
730 // TODO: add support for ExprInvoke
731 if ( noWritingToNameless ) {
732 if ( expr->write && !(expr->type->ref || expr->type->isPointer()) ) {
733 program->error("dead write is prohibited by CodeOfPolicies", "\tin " + expr->describe(), "",
734 expr->at, CompilationError::cant_expression);
735 }
736 }
737 }
738 virtual void preVisit ( ExprCall * expr ) override {
739 Visitor::preVisit(expr);
740 if ( !expr->func ) {

Callers

nothing calls this directly

Calls 3

isPointerMethod · 0.80
errorMethod · 0.45
describeMethod · 0.45

Tested by

no test coverage detected