fix tyToExtend() (#20979)

This commit is contained in:
Walter Bright 2025-03-12 09:02:00 -07:00 committed by GitHub
parent aafe4f954b
commit d09d7689b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -183,7 +183,8 @@ void cdorth(ref CGstate cg, ref CodeBuilder cdb,elem* e,ref regm_t pretregs)
*/
Extend tyToExtend(tym_t ty)
{
assert(tyintegral(ty));
//debug printf("ty: %x\n", ty);
assert(tyintegral(ty) || ty == TYnptr);
Extend extend;
const sz = tysize(ty);
with (Extend) switch (sz)