Add missing type check of init function
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
|
||||
contract InitTypeError =
|
||||
|
||||
type state = map(int, int)
|
||||
|
||||
// Check that the compiler catches ill-typed init function
|
||||
function init() = "not the right type!"
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
contract MissingStateType =
|
||||
|
||||
// Check that we get a type error also for implicit state
|
||||
function init() = "should be ()"
|
||||
|
||||
Reference in New Issue
Block a user