Wondering about errors…
Adam D. Ruppe
destructionator at gmail.com
Mon May 27 04:51:43 PDT 2013
Yeah, me too.
I take a working program and add "gf" to the middle of it. Here's
the errors:
base.d(2143): Error: found '{' when expecting ';' following
statement
base.d(2168): Error: unexpected ( in declarator
base.d(2168): Error: basic type expected, not "div"
base.d(2168): Error: found '"div"' when expecting ')'
base.d(2168): Error: no identifier for declarator
div.addChild(int)
base.d(2168): Error: semicolon expected following function
declaration
base.d(2168): Error: Declaration expected, not ','
base.d(2177): Error: Declaration expected, not 'if'
base.d(2179): Error: no identifier for declarator qrUrl
base.d(2180): Error: unrecognized declaration
OK.... now let's add a semicolon to it. Prepare yourself, here's
what dmd gives me now:
base.d(2141): Error: undefined identifier gf, did you mean
template to(T)?
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/format.d(1723):
Error: template std.format.formatRange does not match any
function template declaration. Candidates are:
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/format.d(1982):
std.format.formatRange(Writer, T, Char)(ref Writer w, ref T
val, ref FormatSpec!(Char) f) if (isInputRange!(T))
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/format.d(1723):
Error: template std.format.formatRange(Writer, T, Char)(ref
Writer w, ref T val, ref FormatSpec!(Char) f) if
(isInputRange!(T)) cannot deduce template function from argument
types !()(Appender!(string),immutable(wchar)[],FormatSpec!(char))
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/conv.d(100):
Error: template instance
std.format.formatValue!(Appender!(string), immutable(wchar)[],
char) error instantiating
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/conv.d(807):
instantiated from here: toStr!(string, immutable(wchar)[])
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/conv.d(274):
instantiated from here: toImpl!(string, immutable(wchar)[])
arsd/characterencodings.d(75): instantiated from here:
to!(immutable(wchar)[])
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/conv.d(807):
Error: template instance std.conv.toStr!(string,
immutable(wchar)[]) error instantiating
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/conv.d(274):
instantiated from here: toImpl!(string, immutable(wchar)[])
arsd/characterencodings.d(75): instantiated from here:
to!(immutable(wchar)[])
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/conv.d(274):
Error: template instance std.conv.toImpl!(string,
immutable(wchar)[]) error instantiating
arsd/characterencodings.d(75): instantiated from here:
to!(immutable(wchar)[])
arsd/characterencodings.d(75): Error: template instance
std.conv.to!(string).to!(immutable(wchar)[]) error instantiating
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/array.d(1718):
Error: template
std.array.Appender!(immutable(dchar)[]).Appender.put does not
match any function template declaration. Candidates are:
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/array.d(2305):
std.array.Appender!(immutable(dchar)[]).Appender.put(U)(U
item) if (isImplicitlyConvertible!(U, T) || isSomeChar!(T) &&
isSomeChar!(U))
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/array.d(2325):
std.array.Appender!(immutable(dchar)[]).Appender.put(Range)(Range
items) if (isInputRange!(Unqual!(Range)) && !isInputRange!(Range))
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/array.d(2334):
std.array.Appender!(immutable(dchar)[]).Appender.put(Range)(Range
items) if (isInputRange!(Range) &&
is(typeof(Appender.init.put(items.front))))
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/array.d(2305):
Error: template
std.array.Appender!(immutable(dchar)[]).Appender.put cannot
deduce template function from argument types
!()(immutable(dchar)[])
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/array.d(1719):
Error: template
std.array.Appender!(immutable(dchar)[]).Appender.put does not
match any function template declaration. Candidates are:
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/array.d(2305):
std.array.Appender!(immutable(dchar)[]).Appender.put(U)(U
item) if (isImplicitlyConvertible!(U, T) || isSomeChar!(T) &&
isSomeChar!(U))
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/array.d(2325):
std.array.Appender!(immutable(dchar)[]).Appender.put(Range)(Range
items) if (isInputRange!(Unqual!(Range)) && !isInputRange!(Range))
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/array.d(2334):
std.array.Appender!(immutable(dchar)[]).Appender.put(Range)(Range
items) if (isInputRange!(Range) &&
is(typeof(Appender.init.put(items.front))))
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/array.d(2305):
Error: template
std.array.Appender!(immutable(dchar)[]).Appender.put cannot
deduce template function from argument types
!()(immutable(dchar)[])
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/array.d(1720):
Error: template std.array.replaceInto does not match any function
template declaration. Candidates are:
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/array.d(1729):
std.array.replaceInto(E, Sink, R1, R2)(Sink sink, E[]
subject, R1 from, R2 to) if (isOutputRange!(Sink, E) &&
isDynamicArray!(E[]) && isForwardRange!(R1) &&
isForwardRange!(R2) && (hasLength!(R2) || isSomeString!(R2)))
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/array.d(1720):
Error: template std.array.replaceInto(E, Sink, R1, R2)(Sink sink,
E[] subject, R1 from, R2 to) if (isOutputRange!(Sink, E) &&
isDynamicArray!(E[]) && isForwardRange!(R1) &&
isForwardRange!(R2) && (hasLength!(R2) || isSomeString!(R2)))
cannot deduce template function from argument types
!()(Appender!(immutable(dchar)[]),immutable(dchar)[],immutable(dchar)[],immutable(dchar)[])
arsd/html.d(1995): Error: template instance
std.array.replace!(immutable(dchar), immutable(dchar)[],
immutable(dchar)[]) error instantiating
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/range.d(608):
Error: static assert "Cannot put a immutable(dchar) into a
Appender!(immutable(dchar)[])"
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/format.d(1691):
instantiated from here: put!(Appender!(immutable(dchar)[]),
immutable(dchar))
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/format.d(2079):
instantiated from here:
formatValue!(Appender!(immutable(dchar)[]), immutable(dchar),
dchar)
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/format.d(1723):
instantiated from here:
formatRange!(Appender!(immutable(dchar)[]), immutable(dchar)[],
dchar)
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/format.d(2863):
... (1 instantiations, -v to show) ...
/home/me/d/dmd2/linux/bin32/../../src/phobos/std/format.d(415):
instantiated from here:
formatGeneric!(Appender!(immutable(dchar)[]), immutable(dchar)[],
dchar)
arsd/html.d(2047): instantiated from here:
formattedWrite!(Appender!(immutable(dchar)[]), dchar,
immutable(dchar)[],immutable(dchar)[],immutable(dchar)[],immutable(dchar)[],immutable(dchar)[])
make: *** [all] Error 1
I'm not making that up. dmd has been doing it for several
releases now - I noticed it started up when I started using
ctRegex in cgi.d and keep hoping it will go away with each
release.
The only relevant line there is:
base.d(2141): Error: undefined identifier gf, did you mean
template to(T)?
Remember, all I changed in this whole (working) program was the
addition of "gf;" in the middle of it.
More information about the Digitalmars-d
mailing list