modular
modular copied to clipboard
[BUG] using alias in Set with one or more arguments fails
Bug description
When using Set collection in mojo, all works if is a variable.
When it's constant using alias, Set only works if the constructor has no arguments.
When you pass 1 or more arguments, the compiler says:
- "no viable expansions found" for "fn main():"
- "failed to evaluate 'apply'" for "alias const_set = SetInt
No errors are displayed on the Linter (When running on VSCode).
Steps to reproduce
- Code on Mojo Playground
from collections import Set
fn main():
alias const_empty_set = Set[Int]() # ok
alias const_set = Set[Int](1) # fails
System information
- Mojo Playground
- mojo 24.2.0 (c2427bc5)
- modular 0.6.0 (04c05243)