[Issue 14240] Segfault while compiling templated code

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Jun 3 23:08:35 PDT 2015


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

Kenji Hara <k.hara.pg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from Kenji Hara <k.hara.pg at gmail.com> ---
This is a regression from 2.066, and a dup of issue 14642 - it's timely fixed
today.

(In reply to Ketmar Dark from comment #1)
> diff --git a/src/interpret.c b/src/interpret.c
> index 9b358e9..bb3e2c3 100644
> --- a/src/interpret.c
> +++ b/src/interpret.c
> @@ -730,7 +730,7 @@ Expression *ctfeInterpret(Expression *e)
>          return e;

>      assert(e->type);                    // Bugzilla 14642
  --> This line now asserts the segfault issue won't reproduce.

>      //assert(e->type->ty != Terror);    // FIXME
> -    if (e->type->ty == Terror)
> +    if (!e->type || e->type->ty == Terror)
>          return new ErrorExp();
> 
>      unsigned olderrors = global.errors;

*** This issue has been marked as a duplicate of issue 14642 ***

--


More information about the Digitalmars-d-bugs mailing list