Skip to content
← Back

src/ir/program/instantiation_limits.ghul

1
namespace IR.Program is
2
/// The bounds that stop a program which instantiates generics at ever
3
/// deeper type arguments from being compiled without end.
4
class INSTANTIATION_LIMITS is
5
/// How deeply type arguments may nest in a class or function
6
/// instance before it is reported rather than compiled.
7
MAXIMUM_TYPE_ARGUMENT_DEPTH: int static => 8
8
9
/// How many instances of one generic class a program may use
10
/// before the class is reported rather than compiled further.
11
MAXIMUM_INSTANTIATIONS: int static => 4096
12
si
13
si