Add missing type check of init function

This commit is contained in:
Ulf Norell
2019-01-08 12:27:39 +01:00
parent 5786b6d813
commit 7849fe302c
4 changed files with 40 additions and 2 deletions
+8
View File
@@ -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!"
+6
View File
@@ -0,0 +1,6 @@
contract MissingStateType =
// Check that we get a type error also for implicit state
function init() = "should be ()"