Test case for calling init function from inside the contract
This commit is contained in:
@@ -477,6 +477,10 @@ failing_contracts() ->
|
||||
"Invalid key type\n"
|
||||
" lm\n"
|
||||
"Map keys cannot contain other maps.">>]}
|
||||
, {"calling_init_function",
|
||||
[<<?Pos(7, 28)
|
||||
"The 'init' function is called exclusively by the create contract transaction\n"
|
||||
"and cannot be called from the contract code.">>]}
|
||||
].
|
||||
|
||||
-define(Path(File), "code_errors/" ??File).
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
contract CallingInitFunction =
|
||||
|
||||
type state = int * int
|
||||
|
||||
entrypoint init() = (1, 2)
|
||||
|
||||
entrypoint call_init() = init()
|
||||
Reference in New Issue
Block a user