diff --git a/compiler/evaltempl.nim b/compiler/evaltempl.nim index 015c14ab5a..82c4e8f573 100644 --- a/compiler/evaltempl.nim +++ b/compiler/evaltempl.nim @@ -66,7 +66,16 @@ proc evalTemplateArgs(n: PNode, s: PSym): PNode = else: 0 var - genericParams = s.ast[genericParamsPos].len + # XXX: Since immediate templates are not subjected to the + # standard sigmatching algorithm, they will have a number + # of deficiencies when it comes to generic params: + # Type dependencies between the parameters won't be honoured + # and the bound generic symbols won't be resolvable within + # their bodies. We could try to fix this, but it may be + # wiser to just deprecate immediate templates and macros + # now that we have working untyped parameters. + genericParams = if sfImmediate in s.flags: 0 + else: s.ast[genericParamsPos].len expectedRegularParams =