How do i find a list of the methods Object implements, or maybe just locate the 'write' method?
bauss
jj_1337 at live.dk
Wed Nov 8 03:33:08 UTC 2017
On Wednesday, 8 November 2017 at 03:05:22 UTC, codephantom wrote:
> On Tuesday, 7 November 2017 at 21:32:26 UTC, Adam D. Ruppe
> wrote:
>>[...]
>
> it's interesting how the compiler deals with scope.
> ---------------------------------------------------------------------------
> // save this in a file named: write.d
>
> import std.stdio;
>
> void main()
> {
> auto o = new Object;
>
> // One of statements below will prevent this code from
> compiling.
> // Which one do you think it is?
>
> // btw. If I instead use gdc on debian, then it will
> // compile both statements just fine, and will work as
> expected too.
>
> o.write;
> write(o);
>
> }
>
> --------------------------------------------------------------------------
Compiles fine with DMD: https://dpaste.dzfl.pl/95b896aa242f
More information about the Digitalmars-d-learn
mailing list