Jump to page: 1 2
Thread overview
bug report(s) on alpha 0.01
Dec 10, 2001
Pavel Minayev
unnamed parameters
Dec 10, 2001
Pavel Minayev
Dec 16, 2001
Walter
no function ... matches argument list
Dec 10, 2001
Pavel Minayev
on other hand...
Dec 10, 2001
Pavel Minayev
Dec 14, 2001
Walter
array concatenation
Dec 11, 2001
Pavel Minayev
Dec 11, 2001
Walter
Dec 12, 2001
Walter
overloading functions taking objects
Dec 13, 2001
Pavel Minayev
Dec 14, 2001
Walter
December 10, 2001
The code was:


    // inter.d

    interface IStream
    {
     bit read(void* buffer, int size);
    }

    interface OStream
    {
     bit write(void* buffer, int size);
    }


  > mars -I..\src\phobos inter.d
  Assertion failure: 'structsize >= 8' on line 425 in file 'glue.c'

Seems to happen every time interfaces are used.

BTW. Could you pleeease make the "bool" data type - might be just an always-defined enum bool { false, true = !false }!


December 10, 2001
    int main(char[][])

    "no identifier for parameter 1 of main()"


Hey, you said it's possible to omit parameter names! =)


December 10, 2001
Something's definitely wrong!

    // file.d (Phobos)
    class File
    {
        ...
        static void write(char[] name, char[] buffer)
        ...
    }

    // my program
    char[] pc, dc;
    ...
    File.write(pc, dc);

Compiler output:

 "..\src\phobos\file.d(77): no function write matches argument list (char
[],char [])"

????????????????



December 10, 2001
"Pavel Minayev" <evilone@omen.ru> wrote in message news:9v344o$1k4n$2@digitaldaemon.com...

>     char[] pc, dc;
>     ...
>     File.write(pc, dc);

Even more funny:

    char[] pc; char[] dc;
    ...
    File.write(pc, dc);

Now it works!?




December 11, 2001
The test snippet was:

    int main(char[][] args)
    {
     char[] s, t;
     s ~= t;
     s ~= "test";
    }

    > mars -I..\src\phobos concat.d
    concat.d(5): can only concatenate arrays

Note that appending t to s works, the problem is
with constant strings.

Also, not a bug really (although not sure): why
can't elements, rather then arrays, be concatenated/
appended?

    char[] s;
    s = 'a' ~ 'r'; // "ar"
    s = 'm' ~ s;   // "mar"
    s ~= 's';      // "mars"

Since binary ~ is not used elsewhere, I don't see
any reasons why this shouldn't work.

BTW. Having used it for a while, ~ seems quite suitable
for concatenation. I take my request (that one to change
it with something else) away, it's fine already.


December 11, 2001
Ok, I'll work on the problems you found. I agree ~ does take a little getting used to.

"Pavel Minayev" <evilone@omen.ru> wrote in message news:9v5jr1$c5a$1@digitaldaemon.com...
> The test snippet was:
>
>     int main(char[][] args)
>     {
>      char[] s, t;
>      s ~= t;
>      s ~= "test";
>     }
>
>     > mars -I..\src\phobos concat.d
>     concat.d(5): can only concatenate arrays
>
> Note that appending t to s works, the problem is
> with constant strings.
>
> Also, not a bug really (although not sure): why
> can't elements, rather then arrays, be concatenated/
> appended?
>
>     char[] s;
>     s = 'a' ~ 'r'; // "ar"
>     s = 'm' ~ s;   // "mar"
>     s ~= 's';      // "mars"
>
> Since binary ~ is not used elsewhere, I don't see
> any reasons why this shouldn't work.
>
> BTW. Having used it for a while, ~ seems quite suitable
> for concatenation. I take my request (that one to change
> it with something else) away, it's fine already.
>
>


December 12, 2001
In digging into this, I find I screwed up how interfaces are implemented. It'll take a couple days to rework it all. Please be patient! -Walter

"Pavel Minayev" <evilone@omen.ru> wrote in message news:9v3243$1ivg$1@digitaldaemon.com...
> The code was:
>
>
>     // inter.d
>
>     interface IStream
>     {
>      bit read(void* buffer, int size);
>     }
>
>     interface OStream
>     {
>      bit write(void* buffer, int size);
>     }
>
>
>   > mars -I..\src\phobos inter.d
>   Assertion failure: 'structsize >= 8' on line 425 in file 'glue.c'
>
> Seems to happen every time interfaces are used.
>
> BTW. Could you pleeease make the "bool" data type - might be just an always-defined enum bool { false, true = !false }!
>
>


December 13, 2001
Just try to compile the following simple snippet:

    class Apple { }
    class Orange { }

    void Eat(Apple a) { }
    void Eat(Orange o) { }

    int main() { }

D doesn't allow to overload Eat() for Oranges...


December 14, 2001
That's definitely a bug in the D compiler. The compiler should also issue an error for not returning a value from int main().

"Pavel Minayev" <evilone@omen.ru> wrote in message news:9varco$pa8$1@digitaldaemon.com...
> Just try to compile the following simple snippet:
>
>     class Apple { }
>     class Orange { }
>
>     void Eat(Apple a) { }
>     void Eat(Orange o) { }
>
>     int main() { }
>
> D doesn't allow to overload Eat() for Oranges...
>
>


December 14, 2001
"Pavel Minayev" <evilone@omen.ru> wrote in message news:9v34jn$1kjl$1@digitaldaemon.com...
> "Pavel Minayev" <evilone@omen.ru> wrote in message news:9v344o$1k4n$2@digitaldaemon.com...
>
> >     char[] pc, dc;
> >     ...
> >     File.write(pc, dc);
>
> Even more funny:
>
>     char[] pc; char[] dc;
>     ...
>     File.write(pc, dc);
>
> Now it works!?

You're right. I need to work on the declaration parsing for multiple names. It was working like in C, but then I just changed it, and it's broken.


« First   ‹ Prev
1 2