Add error messages for bad include and nested namespace
This commit is contained in:
committed by
Ulf Norell
parent
2b7490776e
commit
421bc01012
@@ -203,4 +203,7 @@ failing_contracts() ->
|
||||
" (gas : int, value : int) => map(string, int)">>]}
|
||||
, {"include",
|
||||
[<<"file include, line 1, column 9: includes not allowed in this context\n">>]}
|
||||
, {"bad_include_and_ns",
|
||||
[<<"Include of 'included.aes' at line 2, column 11\nnot allowed, include only allowed at top level.">>,
|
||||
<<"Nested namespace not allowed\nNamespace 'Foo' at line 3, column 13 not defined at top level.">>]}
|
||||
].
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
contract Bad =
|
||||
include "included.aes"
|
||||
namespace Foo =
|
||||
function foo() = 42
|
||||
|
||||
function foo() = 43
|
||||
@@ -2,7 +2,6 @@ include "included.aes"
|
||||
include "../contracts/included2.aes"
|
||||
|
||||
contract Include =
|
||||
// include "maps.aes"
|
||||
function foo() =
|
||||
Included.foo() < Included2a.bar()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user