use typeof instead type (#16962)

This commit is contained in:
flywind 2021-02-08 02:46:07 -06:00 • committed by GitHub
commit d447c0fe3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 253 additions and 253 deletions

View file

@ -232,11 +232,11 @@ proc instantiateProcType(c: PContext, pt: TIdTable,
# time adding the instantiated proc params into the current scope.
# This is necessary, because the instantiation process may refer to
# these params in situations like this:
# proc foo[Container](a: Container, b: a.type.Item): type(b.x)
# proc foo[Container](a: Container, b: a.type.Item): typeof(b.x)
#
# Alas, doing this here is probably not enough, because another
# proc signature could appear in the params:
# proc foo[T](a: proc (x: T, b: type(x.y))
# proc foo[T](a: proc (x: T, b: typeof(x.y))
#
# The solution would be to move this logic into semtypinst, but
# at this point semtypinst have to become part of sem, because it