Add test for wrong scope of using namespace
This commit is contained in:
parent
c823c712ae
commit
21c16158ce
@ -788,6 +788,12 @@ failing_contracts() ->
|
||||
, <<?Pos(13,23)
|
||||
"Unbound variable A.f at line 13, column 23">>
|
||||
])
|
||||
, ?TYPE_ERROR(using_namespace_wrong_scope,
|
||||
[ <<?Pos(19,5)
|
||||
"Unbound variable f at line 19, column 5">>
|
||||
, <<?Pos(21,23)
|
||||
"Unbound variable f at line 21, column 23">>
|
||||
])
|
||||
].
|
||||
|
||||
-define(Path(File), "code_errors/" ??File).
|
||||
|
21
test/contracts/using_namespace_wrong_scope.aes
Normal file
21
test/contracts/using_namespace_wrong_scope.aes
Normal file
@ -0,0 +1,21 @@
|
||||
namespace Nsp1 =
|
||||
function f() = 1
|
||||
|
||||
namespace Nsp2 =
|
||||
using Nsp1
|
||||
|
||||
function g() = 1
|
||||
|
||||
contract Cntr =
|
||||
using Nsp2
|
||||
|
||||
type state = int
|
||||
|
||||
function x() =
|
||||
using Nsp1
|
||||
f()
|
||||
|
||||
function y() =
|
||||
f()
|
||||
|
||||
entrypoint init() = f()
|
Loading…
x
Reference in New Issue
Block a user