[Issue 16244] compiler ICE on complex `typeof()` for method arg type

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Jul 8 12:35:26 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16244

Ketmar Dark <ketmar at ketmar.no-ip.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ketmar at ketmar.no-ip.org

--- Comment #2 from Ketmar Dark <ketmar at ketmar.no-ip.org> ---
fix:

diff --git a/src/dtemplate.d b/src/dtemplate.d
index a5ca897..257ba2a 100644
--- a/src/dtemplate.d
+++ b/src/dtemplate.d
@@ -4883,7 +4883,7 @@ extern (C++) bool reliesOnTident(Type t,
TemplateParameters* tparams = null, siz
         {
             //printf("CallExp::reliesOnTident('%s')\n", e.toChars());
             visit(cast(UnaExp)e);
-            if (!result)
+            if (!result && e.to) // e.to can be null for `cast()`
                 e.to.accept(this);
         }
.
--.
2.9.0

--


More information about the Digitalmars-d-bugs mailing list