-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add check for unserializable transition parameters (#412)
* Add check for unserializable transition parameters * Fixed check of serializable types in message fields
- Loading branch information
1 parent
bcf7299
commit c85e14e
Showing
6 changed files
with
116 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"errors": [ | ||
{ | ||
"error_message": "Type error(s) in contract UnstorableADT:\n", | ||
"start_location": { | ||
"file": "checker/bad/unserializable_param.scilla", | ||
"line": 15, | ||
"column": 10 | ||
}, | ||
"end_location": { "file": "", "line": 0, "column": 0 } | ||
}, | ||
{ | ||
"error_message": "Type error(s) in transition BadADTTrans:\n", | ||
"start_location": { | ||
"file": "checker/bad/unserializable_param.scilla", | ||
"line": 19, | ||
"column": 12 | ||
}, | ||
"end_location": { "file": "", "line": 0, "column": 0 } | ||
}, | ||
{ | ||
"error_message": "Type Test cannot be used as transition parameter", | ||
"start_location": { | ||
"file": "checker/bad/unserializable_param.scilla", | ||
"line": 19, | ||
"column": 25 | ||
}, | ||
"end_location": { "file": "", "line": 0, "column": 0 } | ||
}, | ||
{ | ||
"error_message": "Type error(s) in transition BadPrimTrans:\n", | ||
"start_location": { | ||
"file": "checker/bad/unserializable_param.scilla", | ||
"line": 22, | ||
"column": 12 | ||
}, | ||
"end_location": { "file": "", "line": 0, "column": 0 } | ||
}, | ||
{ | ||
"error_message": "Type Message cannot be used as transition parameter", | ||
"start_location": { | ||
"file": "checker/bad/unserializable_param.scilla", | ||
"line": 22, | ||
"column": 26 | ||
}, | ||
"end_location": { "file": "", "line": 0, "column": 0 } | ||
} | ||
], | ||
"warnings": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
scilla_version 0 | ||
|
||
(***************************************************) | ||
(* Associated library *) | ||
(***************************************************) | ||
|
||
library UnserializableADT | ||
|
||
type Test = | ||
| Bad of (Uint32 -> Uint32) | ||
|
||
(***************************************************) | ||
(* The contract definition *) | ||
(***************************************************) | ||
contract UnstorableADT | ||
( | ||
) | ||
|
||
transition BadADTTrans (p : Test) | ||
end | ||
|
||
transition BadPrimTrans (p : Message) | ||
end |