[Issue 546] New: Error message for accessing a deprecated variable is doubled
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Nov 17 12:05:19 PST 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 at digitalmars.com
ReportedBy: smjg at 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
----------
--
More information about the Digitalmars-d-bugs
mailing list