Thread overview
[Issue 546] New: Error message for accessing a deprecated variable is doubled
Nov 17, 2006
d-bugmail
Dec 06, 2007
d-bugmail
Jun 30, 2008
d-bugmail
Jun 30, 2011
yebblies
Oct 09, 2011
Walter Bright
November 17, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=546

           Summary: Error message for accessing a deprecated variable is
                    doubled
           Product: D
           Version: 0.174
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: smjg@iname.com


----------
deprecated int x;

void main() {
    x = 53;
    int y = x;
}
----------
D:\My Documents\Programming\D\Tests\bugs\dep_var.d(4): variable dep_var.x is
deprecated
D:\My Documents\Programming\D\Tests\bugs\dep_var.d(4): variable dep_var.x is
deprecated
D:\My Documents\Programming\D\Tests\bugs\dep_var.d(5): variable dep_var.x is
deprecated
D:\My Documents\Programming\D\Tests\bugs\dep_var.d(5): variable dep_var.x is
deprecated
----------

The bug also shows if x is a member of a struct, class or union, but only if accessing from within it through the implicit this pointer:

----------
import std.stdio;

class ClassWithDeps {
    deprecated int value;
    deprecated static int staticValue;

    void test(ClassWithDeps obj) {
        value = 666;
        staticValue = 101;
        writefln(value);
        writefln(staticValue);
    }
}
----------
D:\My Documents\Programming\D\Tests\bugs\dep_memvar_double.d(8): variable
dep_memvar_double.ClassWithDeps.value is deprecated
D:\My Documents\Programming\D\Tests\bugs\dep_memvar_double.d(8): variable
dep_memvar_double.ClassWithDeps.value is deprecated
D:\My Documents\Programming\D\Tests\bugs\dep_memvar_double.d(9): variable
dep_memvar_double.ClassWithDeps.staticValue is deprecated
D:\My Documents\Programming\D\Tests\bugs\dep_memvar_double.d(9): variable
dep_memvar_double.ClassWithDeps.staticValue is deprecated
D:\My Documents\Programming\D\Tests\bugs\dep_memvar_double.d(10): variable
dep_memvar_double.ClassWithDeps.value is deprecated
D:\My Documents\Programming\D\Tests\bugs\dep_memvar_double.d(10): variable
dep_memvar_double.ClassWithDeps.value is deprecated
D:\My Documents\Programming\D\Tests\bugs\dep_memvar_double.d(11): variable
dep_memvar_double.ClassWithDeps.staticValue is deprecated
D:\My Documents\Programming\D\Tests\bugs\dep_memvar_double.d(11): variable
dep_memvar_double.ClassWithDeps.staticValue is deprecated
----------


-- 

December 06, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=546


smjg@iname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |547




------- Comment #1 from smjg@iname.com  2007-12-06 14:53 -------
For cases in which the member variable is accessed through an explicit object reference, bug 547 bites instead.  When 547 is fixed, this one may affect these instances as well, so fixing that bug may be necessary to confirm that this one is fixed properly.  Hence the dependency.


-- 

June 30, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=546


bugzilla@digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|minor                       |trivial




------- Comment #2 from bugzilla@digitalmars.com  2008-06-29 19:10 -------
I marked this as trivial because it is cosmetic only.


-- 

June 30, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=546


yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                 CC|                            |yebblies@gmail.com
           Platform|x86                         |All
         OS/Version|Windows                     |All


--- Comment #3 from yebblies <yebblies@gmail.com> 2011-07-01 01:17:47 EST ---
This patch fixes all the test cases in this report.

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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 09, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=546


Walter Bright <bugzilla@digitalmars.com> changed:

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


--- Comment #4 from Walter Bright <bugzilla@digitalmars.com> 2011-10-08 20:46:38 PDT ---
https://github.com/D-Programming-Language/dmd/commit/67f29720eefc61cfbf08b8a0f44c340f4641523e

https://github.com/D-Programming-Language/dmd/commit/c123355559835ac8cd8db647fad75146ee85a632

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