Bug 707 – incorrect error lines for failed aliases
Status
RESOLVED
Resolution
WONTFIX
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2006-12-21T09:23:35Z
Last change time
2019-05-11T21:43:08Z
Keywords
diagnostic
Assigned to
Walter Bright
Creator
Thomas Kühne
Comments
Comment #0 by thomas-dloop — 2006-12-21T09:23:35Z
http://dstress.kuehne.cn/nocompile/a/alias_34_B.d
#
# Foofunc f; // line A
# alias int function(Foo) Foofunc; // line B
#
DMD complains about line A but fails to mention the cause in line B.
http://dstress.kuehne.cn/nocompile/alias_17.d
#
# void test() {}
#
# int _test; // line C
# alias _test test; // line D
#
# void check(){
# test = 1; // line E
# }
DMD complains about lines C and E but fails to mention the cause in line D.
http://dstress.kuehne.cn/nocompile/a/alias_36_E.d
#
# template bar(T) {
# void foo() {
# }
# }
#
# alias bar!(long).foo foo; // line F
# alias bar!(char).foo foo; // line G
#
# void main() {
# foo(); // line H
# }
#
DMD complains about line H but fails to mention the cause in lines G and F.
Comment #1 by andrei — 2010-11-26T13:53:30Z
The first example seems to work properly now on 1.065 and 2.050, but not the other two.
Comment #2 by pro.mathias.lang — 2019-05-11T17:36:14Z
This now give satisfactory error messages. The second case repeats the "x is aliased to a function" a few times, but nothing worth spending time on. Marking as "WONTFIX" so it doesn't show up in the changelog.
Comment #3 by greeenify — 2019-05-11T21:43:08Z
FYI only errors mentioned in git commit messages will show up in the changelog.