Remove {.constant.} pragma

Has not been allowed in Solidity since 0.5.0.
This commit is contained in:
Mark Spanbroek 2022-01-26 17:03:43 +01:00
parent d4d0925c3e
commit 3505149381
1 changed files with 1 additions and 4 deletions

View File

@ -87,8 +87,6 @@ func isConstant(procedure: NimNode): bool =
return true
elif pragma.eqIdent "pure":
return true
elif pragma.eqIdent "constant":
return true
false
func addContractCall(procedure: var NimNode) =
@ -123,7 +121,7 @@ func checkReturnType(procedure: NimNode) =
let returntype = procedure[3][0]
if returntype.kind != nnkEmpty and not procedure.isConstant:
const message =
"only contract functions with {.constant.}, {.pure.} or {.view.} " &
"only contract functions with {.view.} or {.pure.} " &
"can have a return type"
error(message, returntype)
@ -144,4 +142,3 @@ macro contract*(procedure: untyped{nkProcDef|nkMethodDef}): untyped =
template view* {.pragma.}
template pure* {.pragma.}
template constant* {.pragma.}