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
I've encountered a strange problem with template and untyped argument. I'm not sure what exactly is going on. It feels like compiler bug really, as the two examples bellow are only different on wheteher I pass batch: var BatchArg to the function. Once I do, the template's untyped argument is being checked and results in undeclared identifier.
procfun[T]() =templatebar(member: untyped) =discard# works if that template is declared outside funbar(a) # << Error: undeclared identifier: 'a'
it's caused by generic symbol resolution prepass (aka early symbol resolution) IIUC
=> refs: #8677
we need to check whether this bug is a dup
timotheecour
changed the title
Template with untyped argument resulting in undeclared identifier
Template with untyped argument resulting in undeclared identifier (generic symbol resolution prepass)
Jun 26, 2020
timotheecour
changed the title
Template with untyped argument resulting in undeclared identifier (generic symbol resolution prepass)untyped argument used inside generic body gives undeclared identifier due to generic symbol resolution prepass
Jun 27, 2020
I've encountered a strange problem with
template
anduntyped
argument. I'm not sure what exactly is going on. It feels like compiler bug really, as the two examples bellow are only different on wheteher I passbatch: var BatchArg
to the function. Once I do, the template'suntyped
argument is being checked and results inundeclared identifier
.Any hints appreciated.
The text was updated successfully, but these errors were encountered: