Jump to page: 1 2
Thread overview
[Issue 15309] [dmd-internal] ScopeExp.semantic() should set its type always
Nov 10, 2015
Kenji Hara
Nov 10, 2015
Kenji Hara
Nov 10, 2015
Kenji Hara
Jan 25, 2016
Martin Nowak
Jan 26, 2016
Martin Nowak
Feb 01, 2016
Kenji Hara
November 10, 2015
https://issues.dlang.org/show_bug.cgi?id=15309

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|druntime                    |dmd

--
November 10, 2015
https://issues.dlang.org/show_bug.cgi?id=15309

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |15239

--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> ---
This is the cause of issue 15239. The null type field will be referenced in ctfeInterpret function, then a segfault happens.

--
November 10, 2015
https://issues.dlang.org/show_bug.cgi?id=15309

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #2 from Kenji Hara <k.hara.pg@gmail.com> ---
https://github.com/D-Programming-Language/dmd/pull/5263

--
November 10, 2015
https://issues.dlang.org/show_bug.cgi?id=15309

--- Comment #3 from github-bugzilla@puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/0d7462ac9ddc37acf11b4a94a8863d3c01bb434e fix Issue 15309 - [dmd-internal] ScopeExp.semantic() should set its type always

Also check `(type !is null)` at the top of `ScopeExp.semantic()` to avoid
repeated semantic analysis.

--
November 10, 2015
https://issues.dlang.org/show_bug.cgi?id=15309

github-bugzilla@puremagic.com changed:

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

--
January 03, 2016
https://issues.dlang.org/show_bug.cgi?id=15309

--- Comment #4 from github-bugzilla@puremagic.com ---
Commit pushed to stable at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/0d7462ac9ddc37acf11b4a94a8863d3c01bb434e fix Issue 15309 - [dmd-internal] ScopeExp.semantic() should set its type always

--
January 25, 2016
https://issues.dlang.org/show_bug.cgi?id=15309

Martin Nowak <code@dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code@dawg.eu

--- Comment #5 from Martin Nowak <code@dawg.eu> ---
I don't agree w/ this change, my comment from https://github.com/D-Programming-Language/dmd/pull/5263/files#r50680394.

+                // ti is an instance which requires IFTI.
+                sds = ti;
+                type = Type.tvoid;

This in particular changed the semantic of typeof(func!arg) from Error:
expression (func!arg) has no type to plain void. I think it's incorrect to type
a not fully instantiated template function as void (even though there is some
precedence w/ templates being of type void).
For non-function templates it's an error when arguments are missing and even
with this change typeof(&func!arg) triggers the same error.
On top of this all this change broken is(typeof(T.someAttribute)) detection for
types w/ opDispatch.

Also see issue 15550 which was introduced by this change.

--
January 26, 2016
https://issues.dlang.org/show_bug.cgi?id=15309

--- Comment #6 from Martin Nowak <code@dawg.eu> ---
Trying to fix this I arrived at the following conclusion. https://github.com/D-Programming-Language/dmd/pull/5366#issuecomment-174946328

> It's also a deeper problem, because ScopeExp can't know whether it's used in a
> function call with arguments or in a typeof expression, it's not possible to
> resolve the template instance only within ScopeExp. Subsequently ScopeExp
> should be what it's doc comment says `Mainly just a placeholder`, and do
> nothing (or better `assert(0)`) in it's semantic function.
> Anything involving a ScopeExp must be handled above it (using the template
> instance stored in the ScopeExp).

--
February 01, 2016
https://issues.dlang.org/show_bug.cgi?id=15309

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #7 from Kenji Hara <k.hara.pg@gmail.com> ---
(In reply to Martin Nowak from comment #6)
> Trying to fix this I arrived at the following conclusion. https://github.com/D-Programming-Language/dmd/pull/5366#issuecomment- 174946328
> 
> > It's also a deeper problem, because ScopeExp can't know whether it's used in a
> > function call with arguments or in a typeof expression, it's not possible to
> > resolve the template instance only within ScopeExp. Subsequently ScopeExp
> > should be what it's doc comment says `Mainly just a placeholder`, and do
> > nothing (or better `assert(0)`) in it's semantic function.
> > Anything involving a ScopeExp must be handled above it (using the template
> > instance stored in the ScopeExp).

We can easily check that a ScopeExp is a partial instantiation or not.

https://github.com/D-Programming-Language/dmd/pull/5390

--
February 01, 2016
https://issues.dlang.org/show_bug.cgi?id=15309

--- Comment #8 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/779142e844bd0a2d40e8fee3687ae72d733fb536 fix issue 15309 again, add proper fix for issue 15550

Recognize partial instantiation form inside typeof()

https://github.com/D-Programming-Language/dmd/commit/ef5cb0d2c5cd7562d66b51d44e84e2655704dac6 Merge pull request #5390 from 9rnsr/fix15309

Fix issue 15309 again, without breaking the fix for regression 15550

--
« First   ‹ Prev
1 2