MCPcopy Create free account
hub / github.com/argotorg/solidity / functionType

Method functionType

libsolidity/ast/AST.cpp:453–486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

451}
452
453FunctionTypePointer FunctionDefinition::functionType(bool _internal) const
454{
455 if (_internal)
456 {
457 switch (visibility())
458 {
459 case Visibility::Default:
460 solAssert(false, "visibility() should not return Default");
461 case Visibility::Private:
462 case Visibility::Internal:
463 case Visibility::Public:
464 return TypeProvider::function(*this, FunctionType::Kind::Internal);
465 case Visibility::External:
466 return {};
467 }
468 }
469 else
470 {
471 switch (visibility())
472 {
473 case Visibility::Default:
474 solAssert(false, "visibility() should not return Default");
475 case Visibility::Private:
476 case Visibility::Internal:
477 return {};
478 case Visibility::Public:
479 case Visibility::External:
480 return TypeProvider::function(*this, FunctionType::Kind::External);
481 }
482 }
483
484 // To make the compiler happy
485 return {};
486}
487
488Type const* FunctionDefinition::type() const
489{

Callers 15

matchEventMethod · 0.45
userDocumentationMethod · 0.45
devDocumentationMethod · 0.45
uniqueInterfaceEventsMethod · 0.45
interfaceSymbolsMethod · 0.45
checkMethod · 0.45
visitMethod · 0.45
endVisitMethod · 0.45
endVisitMethod · 0.45
erc7201CompileTimeValueFunction · 0.45
AST.cppFile · 0.45

Calls 1

functionFunction · 0.85

Tested by 4

matchEventMethod · 0.36
userDocumentationMethod · 0.36
devDocumentationMethod · 0.36
uniqueInterfaceEventsMethod · 0.36