digitalmars.D.learn - alias declaration spec
- cal (7/7) Feb 25 2014 Grammar spec (http://dlang.org/grammar.html#AliasDeclaration)
- Jonathan M Davis (5/16) Feb 25 2014 No. ref is not part of the BasicType grammar rule. ref is only legal on
- cal (3/21) Feb 25 2014 Thanks, I'll file this a grammar bug.
- Jonathan M Davis (4/29) Feb 26 2014 If anything, it's a bug that ref is allowed in an alias given that it ca...
- John Colvin (3/37) Feb 26 2014 You can also get ref in a type using is(foo Types == function)
Grammar spec (http://dlang.org/grammar.html#AliasDeclaration) allows: AliasDeclaration: alias BasicType Declarator DMD allows: alias ref int MyRefInt; Is the ref storage class allowed by the current grammar spec?
Feb 25 2014
On Tuesday, February 25, 2014 22:32:44 cal wrote:Grammar spec (http://dlang.org/grammar.html#AliasDeclaration) allows: AliasDeclaration: alias BasicType Declarator DMD allows: alias ref int MyRefInt; Is the ref storage class allowed by the current grammar spec?No. ref is not part of the BasicType grammar rule. ref is only legal on function parameters, return types, and the variable in a foreach loop and is not part of the type. - Jonathan M Davis
Feb 25 2014
On Tuesday, 25 February 2014 at 23:09:43 UTC, Jonathan M Davis wrote:On Tuesday, February 25, 2014 22:32:44 cal wrote:Thanks, I'll file this a grammar bug.Grammar spec (http://dlang.org/grammar.html#AliasDeclaration) allows: AliasDeclaration: alias BasicType Declarator DMD allows: alias ref int MyRefInt; Is the ref storage class allowed by the current grammar spec?No. ref is not part of the BasicType grammar rule. ref is only legal on function parameters, return types, and the variable in a foreach loop and is not part of the type. - Jonathan M Davis
Feb 25 2014
On Tuesday, February 25, 2014 23:14:08 cal wrote:On Tuesday, 25 February 2014 at 23:09:43 UTC, Jonathan M Davis wrote:If anything, it's a bug that ref is allowed in an alias given that it can't be part of a type, and alias is used to either alias a type or a symbol. - Jonathan M DavisOn Tuesday, February 25, 2014 22:32:44 cal wrote:Thanks, I'll file this a grammar bug.Grammar spec (http://dlang.org/grammar.html#AliasDeclaration) allows: AliasDeclaration: alias BasicType Declarator DMD allows: alias ref int MyRefInt; Is the ref storage class allowed by the current grammar spec?No. ref is not part of the BasicType grammar rule. ref is only legal on function parameters, return types, and the variable in a foreach loop and is not part of the type. - Jonathan M Davis
Feb 26 2014
On Wednesday, 26 February 2014 at 11:45:54 UTC, Jonathan M Davis wrote:On Tuesday, February 25, 2014 23:14:08 cal wrote:You can also get ref in a type using is(foo Types == function)On Tuesday, 25 February 2014 at 23:09:43 UTC, Jonathan M Davis wrote:If anything, it's a bug that ref is allowed in an alias given that it can't be part of a type, and alias is used to either alias a type or a symbol. - Jonathan M DavisOn Tuesday, February 25, 2014 22:32:44 cal wrote:Thanks, I'll file this a grammar bug.Grammar spec (http://dlang.org/grammar.html#AliasDeclaration) allows: AliasDeclaration: alias BasicType Declarator DMD allows: alias ref int MyRefInt; Is the ref storage class allowed by the current grammar spec?No. ref is not part of the BasicType grammar rule. ref is only legal on function parameters, return types, and the variable in a foreach loop and is not part of the type. - Jonathan M Davis
Feb 26 2014