You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The application panicked (crashed).
Message: ICE: missing trait impl - should be caught during type checking
Location: compiler/noirc_frontend/src/monomorphization/mod.rs:994
To Reproduce
use dep::std::unsafe::zeroed;pubfnresize<TItem,NEW_LEN,OLD_LEN>(src:[TItem;OLD_LEN]) -> [TItem;NEW_LEN]{assert(NEW_LEN >= OLD_LEN,"New length must be greater than or equal to old length");letmut dest = [zeroed();NEW_LEN];for i in0..OLD_LEN{
dest[i] = src[i];}
dest
}structFragment<MAX_DATA_LEN>{data:[u8;MAX_DATA_LEN]}impl<DATA_LEN,MAX_DATA_LEN>From<[u8;DATA_LEN]>forFragment<MAX_DATA_LEN>{fnfrom(data:[u8;DATA_LEN]) -> Fragment<MAX_DATA_LEN>{Fragment{data:resize(data)}}}
global MAX_PREFIXED_KEY_NIBBLE_LEN = 6;
global some_key:[u8;2] = [0xab,0xcd];
global some_key_fragment:Fragment<MAX_PREFIXED_KEY_NIBBLE_LEN> = From::from(some_key);fnmain(){println(some_key_fragment);}
Project Impact
Nice-to-have
Impact Context
I can't use From/Into and am forced to write converter functions instead which is uglier
Workaround
Yes
Workaround Description
Convert using a function
Additional Context
No response
Installation Method
Binary (noirup default)
Nargo Version
0.26.0
NoirJS Version
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered:
Aim
I want to be able to use From/Into traits
Expected Behavior
They work
Bug
The application panicked (crashed).
Message: ICE: missing trait impl - should be caught during type checking
Location: compiler/noirc_frontend/src/monomorphization/mod.rs:994
To Reproduce
Project Impact
Nice-to-have
Impact Context
I can't use From/Into and am forced to write converter functions instead which is uglier
Workaround
Yes
Workaround Description
Convert using a function
Additional Context
No response
Installation Method
Binary (
noirup
default)Nargo Version
0.26.0
NoirJS Version
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered: