Thread overview
[Issue 199] Label causes scope to collapse into parent
Dec 25, 2013
yebblies
Dec 28, 2013
yebblies
Dec 28, 2013
Stewart Gordon
Dec 28, 2013
yebblies
Dec 28, 2013
Stewart Gordon
Dec 28, 2013
Walter Bright
December 25, 2013
https://d.puremagic.com/issues/show_bug.cgi?id=199


yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
                 CC|                            |yebblies@gmail.com
           Platform|x86                         |All
         AssignedTo|bugzilla@digitalmars.com    |yebblies@gmail.com
         OS/Version|Windows                     |All


--- Comment #34 from yebblies <yebblies@gmail.com> 2013-12-25 17:55:30 EST ---
The 9th commandment settles this IMO: "Where D code looks the same as C code, have it either behave the same or issue an error."

Compiles without error, but fails in D.

==============

int i = 1;

void main()
{
label:
    {
        int i = 2;
    }
    assert(i == 1);
}

==============

I've been porting a fairly large C++ codebase to D (the D frontend) and this seems to be a fairly pointless gotcha.

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

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 28, 2013
https://d.puremagic.com/issues/show_bug.cgi?id=199



--- Comment #35 from github-bugzilla@puremagic.com 2013-12-28 00:17:47 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/d0bfecae2ab724bb81b0b1ac5e093240420b6bde Fix Issue 199 - Label causes scope to collapse into parent

https://github.com/D-Programming-Language/dmd/commit/ced168b8792cf47c0b1727b95019deec8f847627 Merge pull request #3024 from yebblies/issue199

Issue 199 - Label causes scope to collapse into parent

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 28, 2013
https://d.puremagic.com/issues/show_bug.cgi?id=199


yebblies <yebblies@gmail.com> changed:

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


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 28, 2013
https://d.puremagic.com/issues/show_bug.cgi?id=199


Stewart Gordon <smjg@iname.com> changed:

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


--- Comment #36 from Stewart Gordon <smjg@iname.com> 2013-12-28 02:16:39 PST ---
Reopening pending the necessary amendment to the spec.  See comment 17.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 28, 2013
https://d.puremagic.com/issues/show_bug.cgi?id=199


yebblies <yebblies@gmail.com> changed:

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


--- Comment #37 from yebblies <yebblies@gmail.com> 2013-12-28 21:39:31 EST ---
The spec has already been updated.  Open an enhancement if you want something else, this issue is fixed.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 28, 2013
https://d.puremagic.com/issues/show_bug.cgi?id=199



--- Comment #38 from Stewart Gordon <smjg@iname.com> 2013-12-28 04:46:20 PST ---
(In reply to comment #37)
> The spec has already been updated.  Open an enhancement if you want something else, this issue is fixed.

Where can I read a more up-to-date version of the spec than what is on dlang.org?

And why has the 'spec' keyword been removed, even though the anomaly in the spec was part of the issue?

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 28, 2013
https://d.puremagic.com/issues/show_bug.cgi?id=199


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |spec
             Status|RESOLVED                    |REOPENED
                 CC|                            |bugzilla@digitalmars.com
            Version|D1 & D2                     |D1
         Resolution|FIXED                       |


--- Comment #39 from Walter Bright <bugzilla@digitalmars.com> 2013-12-28 12:20:29 PST ---
(In reply to comment #38)
> Where can I read a more up-to-date version of the spec than what is on dlang.org?

On github:

https://github.com/D-Programming-Language/dlang.org/pull/457

> And why has the 'spec' keyword been removed, even though the anomaly in the spec was part of the issue?

I don't know. I added it back in.

This is also now reopened as a D1 only issue.

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