fixes #14470 [backport:1.2] (#19115)

This commit is contained in:
Andreas Rumpf 2021-11-09 22:48:04 +01:00 • committed by GitHub
commit 15157d06c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -220,7 +220,8 @@ proc isInvalidReturnType(conf: ConfigRef; rettype: PType): bool =
# such a poor programming language.
# We exclude records with refs too. This enhances efficiency and
# is necessary for proper code generation of assignments.
if rettype == nil: result = true
if rettype == nil or getSize(conf, rettype) > conf.target.floatSize*3:
result = true
else:
case mapType(conf, rettype, skResult)
of ctArray: