Enforce unique top-level names for tests too.
This prevents the compiler from crashing later on. Test names should be unique and not clash with function names.
This commit is contained in:
parent
4dfb454d8a
commit
22a526bb13
|
@ -995,6 +995,7 @@ impl<'a> Environment<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Definition::Test(Function { name, location, .. }) => {
|
Definition::Test(Function { name, location, .. }) => {
|
||||||
|
assert_unique_value_name(names, name, location)?;
|
||||||
hydrators.insert(name.clone(), Hydrator::new());
|
hydrators.insert(name.clone(), Hydrator::new());
|
||||||
let arg_types = vec![];
|
let arg_types = vec![];
|
||||||
let return_type = builtins::bool();
|
let return_type = builtins::bool();
|
||||||
|
|
Loading…
Reference in New Issue