* fixes #12642

* update important packages; refs #18804

* fixes #18805; refs #18806

* fixes a regression

* Update testament/categories.nim

Co-authored-by: flywind <xzsflywind@gmail.com>

* progress

* progress

Co-authored-by: flywind <xzsflywind@gmail.com>
This commit is contained in:
Andreas Rumpf 2021-09-06 17:43:03 +02:00 • committed by GitHub
commit 34a53e8049
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 36 additions and 7 deletions

View file

@ -174,6 +174,12 @@ proc commonType*(c: PContext; x, y: PType): PType =
result = b #.skipIntLit
elif a.kind in IntegralTypes and a.n != nil:
result = a #.skipIntLit
elif a.kind == tyProc and b.kind == tyProc:
if a.callConv == ccClosure and b.callConv != ccClosure:
result = x
elif compatibleEffects(a, b) != efCompat or
(b.flags * {tfNoSideEffect, tfGcSafe}) < (a.flags * {tfNoSideEffect, tfGcSafe}):
result = y
else:
var k = tyNone
if a.kind in {tyRef, tyPtr}: