Hi!
Everyone not agree with me ? give me a response please.
I think it is important to make a constant of class a really constant, don’t
you think so?
RE: Bug when using program as key of mapping
发件人:
雪松 郭 (<zenothing[at]hotmail.com>)
发送时间:
2009年8月26日 8:05:49
收件人:
<grubba[at]roxen.com>; <peterpan[at]wukong.com>
抄送:
<pike[at]roxen.com> (<pike[at]roxen.com>)
I see. But it sould still be considered as a bug.
I modified your class A as following:
class A {
class B {
mixed b() {
return A.C;
//return C;
}
}
class C {
}
}
Since C is a constant of class A, B.b() reference a constant of its parent scope.
Why it should be considered as whatever PROGRAM_USES_PARENT ?
I think A.C has the same position of constants such as "hello", 1,2,3 ...
If the class referenced A.C become a function, then the classes referenced any
constant string or number should be function too.
"A program is no more a constant because it reference another constant"? it's a
joke!
Xuesong Guo
|