Open jfecher opened 2 months ago
Just a note that we get the same error if it's a local let
instead of a global:
use std::collections::map::HashMap;
use std::hash::poseidon2::Poseidon2Hasher;
use std::hash::BuildHasherDefault;
fn main() {
let map: HashMap<Field, Field, 2, Poseidon2Hasher> = {
let mut map = HashMap::default();
map.insert(1, 2);
map.insert(3, 4);
map
};
}
Aim
Expected Behavior
The program to type check correctly
Bug
It is probably an issue with resolving trait constraints on globals before the type constraint from their declaration is applied.
To Reproduce
1. 2. 3. 4.
Project Impact
None
Impact Context
No response
Workaround
None
Workaround Description
No response
Additional Context
No response
Installation Method
None
Nargo Version
No response
NoirJS Version
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response