Bug 11389 – template arity does not work with function type

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-10-30T13:58:56Z
Last change time
2017-10-16T09:58:01Z
Assigned to
No Owner
Creator
Phil Lavoie

Comments

Comment #0 by maidenphil — 2013-10-30T13:58:56Z
This program crashes unexpectedly: import std.stdio; import std.traits; void main( string[] args ) { alias TheType = size_t function( string[] ); static assert( isCallable!TheType ); static assert( variadicFunctionStyle!TheType == Variadic.no ); //Should meet the requirements now. static assert( arity!TheType == 1 ); //Crashes here. }
Comment #1 by github-bugzilla — 2017-09-17T22:08:57Z
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/b4aeee60503b0a20c15fea8d3d8dbaddfc60c017 fix issue 11389 - template arity does not work with function type https://github.com/dlang/phobos/commit/762044e486a000db570e61834a6af7db07ca5fae Merge pull request #5736 from BBasile/issue-11389 fix issue 11389 - template arity does not work with function type merged-on-behalf-of: Petar Kirov <[email protected]>
Comment #2 by github-bugzilla — 2017-10-16T09:58:01Z
Commits pushed to stable at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/b4aeee60503b0a20c15fea8d3d8dbaddfc60c017 fix issue 11389 - template arity does not work with function type https://github.com/dlang/phobos/commit/762044e486a000db570e61834a6af7db07ca5fae Merge pull request #5736 from BBasile/issue-11389