Thread overview
[Issue 14395] default value collapsed (dmd2.067)
Apr 02, 2015
Ketmar Dark
Apr 03, 2015
ag0aep6g@gmail.com
[Issue 14395] [REG2.067] Typesafe variadic function call collapsed if being used for default value
Apr 03, 2015
Kenji Hara
April 02, 2015
https://issues.dlang.org/show_bug.cgi?id=14395

--- Comment #1 from Ketmar Dark <ketmar@ketmar.no-ip.org> ---
slightly minimized sample:

int V2u (uint[1] ar...) {
  return ar[0];
}

void print (int size=V2u(7)) {
  assert(size == 7);
}

void main () {
  print();
}

--
April 03, 2015
https://issues.dlang.org/show_bug.cgi?id=14395

ag0aep6g@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ag0aep6g@gmail.com

--- Comment #2 from ag0aep6g@gmail.com ---
Introduced in https://github.com/D-Programming-Language/dmd/pull/4015

--
April 03, 2015
https://issues.dlang.org/show_bug.cgi?id=14395

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, wrong-code
           Hardware|x86_64                      |All
            Summary|default value collapsed     |[REG2.067] Typesafe
                   |(dmd2.067)                  |variadic function call
                   |                            |collapsed if being used for
                   |                            |default value
                 OS|Windows                     |All

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

--
April 04, 2015
https://issues.dlang.org/show_bug.cgi?id=14395

--- Comment #4 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/9982f52fee882bd78143ce76e8547ef59c8e8454
fix Issue 14395 - Typesafe variadic function call collapsed if being used for
default value

Out of function body `__arrayArg` was not initialized by the array literal, because `VarDeclaraton::semantic()` does not wrap the initializer expression with ConstructExp when `sc->func == NULL`.

To fix the issue, remove use of temporary variable for typesafe variadic argument.

https://github.com/D-Programming-Language/dmd/commit/e926becf170376bdefccb5fb1812c0214c7db324 Merge pull request #4551 from 9rnsr/fix14395

[REG2.067] Issue 14395 - Typesafe variadic function call collapsed if being used for default value

--
April 04, 2015
https://issues.dlang.org/show_bug.cgi?id=14395

github-bugzilla@puremagic.com changed:

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

--
April 17, 2015
https://issues.dlang.org/show_bug.cgi?id=14395

--- Comment #5 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/1efec7b7aebb7581ece00c8cc1305d2e9c5fc735 Merge pull request #4551 from 9rnsr/fix14395

[REG2.067] Issue 14395 - Typesafe variadic function call collapsed if being used for default value

--
April 26, 2015
https://issues.dlang.org/show_bug.cgi?id=14395

--- Comment #6 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/1efec7b7aebb7581ece00c8cc1305d2e9c5fc735 Merge pull request #4551 from 9rnsr/fix14395

--
June 17, 2015
https://issues.dlang.org/show_bug.cgi?id=14395

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

https://github.com/D-Programming-Language/dmd/commit/9982f52fee882bd78143ce76e8547ef59c8e8454
fix Issue 14395 - Typesafe variadic function call collapsed if being used for
default value

https://github.com/D-Programming-Language/dmd/commit/e926becf170376bdefccb5fb1812c0214c7db324 Merge pull request #4551 from 9rnsr/fix14395

--