[dmd-beta] dmd 2.063 beta 5
Kenji Hara
k.hara.pg at gmail.com
Thu May 23 03:54:06 PDT 2013
2013/5/23 Jacob Carlborg <doob at me.com>
> There are a couple of errors in Tango. Tango compiled perfectly fine with
> the previous release, 2.062, without any warnings or deprecation messages.
>
> * tango/io/device/File.d(290): Error: cannot make expression out of
> initializer for ReadExisting
>
>
> https://github.com/SiegeLord/Tango-D2/blob/d2port/tango/io/device/File.d#L290
>
Regression:
http://d.puremagic.com/issues/show_bug.cgi?id=10142
> * tango/core/tools/StackTrace.d(186): Error: class
> tango.core.tools.StackTrace.BasicTraceInfo interface function 'string
> toString() const' is not implemented
>
>
> https://github.com/SiegeLord/Tango-D2/blob/d2port/tango/core/tools/StackTrace.d#L186
>
This is expected change. The type of Throwable.TraceInfo.toString is
string() const, but BasicTraseInfo.toString is not const.
By fixing issue 8366, now const attribute is never inherited automatically.
Fixing way: Add const to BasicTraceInfo.toString
Reduced case:
class BasicTraceInfo: Throwable.TraceInfo
{
override immutable(char)[] toString() /*const*/
{
immutable(char)[] ret;
return ret;
}
}
* tango/io/selector/SelectSelector.d(156): Error: function
> tango.io.selector.SelectSelector.HandleSet.opAssign is not callable because
> it is annotated with @disable
>
>
> https://github.com/SiegeLord/Tango-D2/blob/d2port/tango/io/selector/SelectSelector.d#L156
>
> Tango doesn't use @disable at all. "opAssign" is not overloaded.
>
Expected behavior. HandleSet.DefaultSize is a const int field, so HandleSet
struct is not identity assignable.
Fixing way:
Change HandleSet.DefaultSize to enum or static.
Reduced case:
struct BitArray // from tango.core.BitArray
{
this(this) {}
// IF postblit exists, compiler will try to generate identity
opAssign implicitly.
// --> typeof(this) opAssign(typeof(this) rhs);
}
private struct HandleSet
{
/** Default number of handles that will be held in the HandleSet. */
const uint DefaultSize = 1024;
BitArray _buffer;
// _buffer has opAssign, so HandleSet also need to generate
identity opAssign.
// --> typeof(this) opAssign(typeof(this) rhs);
// BUT, its smeantic would fail because DefaultSize field is not
assignable.
// so generated opAssign would be implicitly annotated with
@disable.
// --> typeof(this) opAssign(typeof(this) rhs) @disable;
}
void main()
{
HandleSet hs;
hs = hs; // @disable opAssign would be called, and fail to
compile
}
* Error: cannot modify struct this HandleSet with immutable members
>
> No file or line information. Ok, I would the actual problem, but the error
> message is very unclear. There was a "const" member in HandleSet, it should
> have been static.
>
>
> https://github.com/SiegeLord/Tango-D2/blob/d2port/tango/io/selector/SelectSelector.d#L783
>
Definitely a bug. I'm working for it...
> * tango/text/Regex.d(1779): Error: variable
> tango.text.Regex.TNFA!(dchar).TNFA.pca final cannot be applied to variable,
> perhaps you meant const?
> tango/text/Regex.d(2528): Error: template instance
> tango.text.Regex.TNFA!(dchar) error instantiating
> tango/text/Regex.d(3668): instantiated from here: TDFA!(dchar)
> tango/text/Regex.d(4412): instantiated from here: RegExpT!(char)
> tango/text/Regex.d(3668): Error: template instance
> tango.text.Regex.TDFA!(dchar) error instantiating
> tango/text/Regex.d(4412): instantiated from here: RegExpT!(char)
> tango/text/Regex.d(4399): Error: tdfa_t.Command is used as a type
> tango/text/Regex.d(4412): Error: template instance
> tango.text.Regex.RegExpT!(char) error instantiatin
>
> https://github.com/SiegeLord/Tango-D2/blob/d2port/tango/text/Regex.d#L1779
>
> There are no final variables in that file as far as I can see. The error
> message is pointing to an enum.
>
Regression:
http://d.puremagic.com/issues/show_bug.cgi?id=10142
Kenji Hara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/dmd-beta/attachments/20130523/4a3fa5c2/attachment-0001.html>
More information about the dmd-beta
mailing list