This isn’t something you can do, unfortunately. For a workaround, see templates - Expressions depending on integer type parameters in type definitions in Julia are not allowed - Stack Overflow and Arithmetic on integer type parameters
2 Likes