[Issue 8695] ParameterStorageClassTuple doesn't recognize 'in' parameters

2019-10-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8695

RazvanN  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||razvan.nitu1...@gmail.com
 Resolution|--- |FIXED

--- Comment #8 from RazvanN  ---
Spec:   defined as scope const. However in has not yet been properly
implemented so it's current implementation is equivalent to const. It is
recommended to avoid using in until it is properly defined and implemented. Use
scope const or const explicitly instead.

Closing as fixed.

--


[Issue 8695] ParameterStorageClassTuple doesn't recognize 'in' parameters

2013-11-24 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=8695



--- Comment #7 from yebblies yebbl...@gmail.com 2013-11-25 01:02:12 EST ---
*** Issue 8749 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8695] ParameterStorageClassTuple doesn't recognize 'in' parameters

2013-01-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8695


Mihail Strashun m.stras...@gmail.com changed:

   What|Removed |Added

 CC||m.stras...@gmail.com


--- Comment #1 from Mihail Strashun m.stras...@gmail.com 2013-01-14 04:56:39 
PST ---
Somewhat similar, but for inout:

-
import std.traits;

inout int func(inout int param)
{
return param;
}

void main()
{
alias stcs = ParameterStorageClassTuple!(typeof(func));
pragma(msg, stcs);
}
-
/usr/local/include/dmd2/std/traits.d(97): Error: key 'g' not found in
associative array
['a':cast(FunctionAttribute)1u,'b':cast(FunctionAttribute)2u,'c':cast(FunctionAttribute)4u,'d':cast(FunctionAttribute)8u,'e':cast(FunctionAttribute)16u,'f':cast(FunctionAttribute)32u]
/usr/local/include/dmd2/std/traits.d(458): called from here:
demangleFunctionAttributes(NgiZic)
/usr/local/include/dmd2/std/traits.d(97): Error: key 'g' not found in
associative array
['a':cast(FunctionAttribute)1u,'b':cast(FunctionAttribute)2u,'c':cast(FunctionAttribute)4u,'d':cast(FunctionAttribute)8u,'e':cast(FunctionAttribute)16u,'f':cast(FunctionAttribute)32u]
/usr/local/include/dmd2/std/traits.d(458): called from here:
demangleFunctionAttributes(NgiZic)
/home/c565/c253.d(10): Error: template instance
std.traits.ParameterStorageClassTuple!(inout int(inout(int) param)) error
instantiating
demangleNextParameter!(demangleFunctionAttributes(NgiZic).rest)
-

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8695] ParameterStorageClassTuple doesn't recognize 'in' parameters

2013-01-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8695



--- Comment #2 from Mihail Strashun m.stras...@gmail.com 2013-01-14 05:11:11 
PST ---
Hm, after some inspection it is not that related, I'll probably make a separate
bugzilla entry after scratching a fix.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8695] ParameterStorageClassTuple doesn't recognize 'in' parameters

2013-01-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8695


Kenji Hara k.hara...@gmail.com changed:

   What|Removed |Added

  Component|Phobos  |DMD


--- Comment #3 from Kenji Hara k.hara...@gmail.com 2013-01-14 06:53:14 PST ---
Comment#0 is a compiler issue.

In current, dmd converts 'in' storage class to 'const', not 'const scpope'.
But, I'm not sure which is correct, a wrong spec issue or compiler
implementation bug.

Comment #1 is a Phobos issue.

ParameterStorageClassTuple and functionAttributes uses a private utility
demangleFunctionAttributes, but it does not recognize inout function.

For the latter, I opened a separate bug 9317.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8695] ParameterStorageClassTuple doesn't recognize 'in' parameters

2013-01-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8695



--- Comment #4 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-14 
07:34:33 PST ---
(In reply to comment #3)
 Comment#0 is a compiler issue.
 
 In current, dmd converts 'in' storage class to 'const', not 'const scpope'.
 But, I'm not sure which is correct, a wrong spec issue or compiler
 implementation bug.

The spec page had not had 'in' documented for a long time, and we've discussed
it many times where we said 'in' was 'const scope'. It's a compiler bug.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8695] ParameterStorageClassTuple doesn't recognize 'in' parameters

2013-01-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8695



--- Comment #5 from Kenji Hara k.hara...@gmail.com 2013-01-14 07:47:03 PST ---
(In reply to comment #4)
 (In reply to comment #3)
  Comment#0 is a compiler issue.
  
  In current, dmd converts 'in' storage class to 'const', not 'const scpope'.
  But, I'm not sure which is correct, a wrong spec issue or compiler
  implementation bug.
 
 The spec page had not had 'in' documented for a long time, and we've discussed
 it many times where we said 'in' was 'const scope'. It's a compiler bug.

Even if it is correct, 'scope' storage class had not been discussed enough and
its semantics had not been defined deeply.

In recent Walter says about 'scope': nobody has gotten around to it.
https://github.com/D-Programming-Language/phobos/commit/ef0bed7d157afe5be5a69e17d5f30ffd309be527#commitcomment-2352989

So it seems to me that is yet not _defined_.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8695] ParameterStorageClassTuple doesn't recognize 'in' parameters

2013-01-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8695



--- Comment #6 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-14 
07:52:49 PST ---
(In reply to comment #5)
 In recent Walter says about 'scope': nobody has gotten around to it.
 https://github.com/D-Programming-Language/phobos/commit/ef0bed7d157afe5be5a69e17d5f30ffd309be527#commitcomment-2352989
 
 So it seems to me that is yet not _defined_.

So basically it was a no-op all this time. We've been telling newcomers to D
that 'in' means 'const scope' for the longest time.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---