interface IA
{
void fnA();
}
interface IB
{
void fnB();
}
shared interface IC : IA, IB
{
void fnC();
}
shared class C : IA, IB
{
override void fnA() // Error: function main.C.fnA does not
override any function, did you mean to override 'main.IA.fnA'?
{
On Sunday, 15 February 2015 at 10:43:46 UTC, Andrey Derzhavin
wrote:
what is wrong in declarations, if I need to declare shared
classes D and C?
`shared` on a class/interface makes all members shared. And
that's all it does.
So this:
interface IA
{
void fnA();
}
shared class C : IA
On Sunday, 15 February 2015 at 11:30:46 UTC, anonymous wrote:
On Sunday, 15 February 2015 at 10:43:46 UTC, Andrey Derzhavin
wrote:
what is wrong in declarations, if I need to declare shared
classes D and C?
`shared` on a class/interface makes all members shared. And
that's all it does.
So t
On Sunday, 15 February 2015 at 12:34:50 UTC, Andrey Derzhavin
wrote:
On Sunday, 15 February 2015 at 11:30:46 UTC, anonymous wrote:
[...]
interface IA
{
void fnA();
}
shared interface IC : IA
{
void fnC();
}
class D : IC
{
override void fnC() shared {}
override void fnA() {}
}
-
On Sunday, 15 February 2015 at 14:59:20 UTC, anonymous wrote:
Hm? Works for me. What error do you get, or what doesn't work?
Which compiler are you using, which version?
The error "Error: function main.C.fnA does not
override any function, did you mean to override 'main.IA.fnA'?"
has occured
On Sunday, 15 February 2015 at 14:59:20 UTC, anonymous wrote:
Sorry everything is OK. It's my fault. Thanks))
Simplified from something bigger:
import std.range, std.algorithm, std.stdio;
void foo(float[] data, float[] xs, float[] ys)
{
auto indices = iota(0, data.length, ys.length)
.map!(xBase =>
iota(xBase, xBase + ys.length - 1)
.map!(y =>
John Colvin:
prints things like [0, 4, 5, 1, 1, 1459971595, 1459971596, 2,
2, 1459971596, 1459971597, 3, 4, 8, 9, 5, 5, 4441427819,
4441427820, 6, 6, 4441427820, 4441427821, 7] but the output
isn't consistent, the big numbers change on each run.
Try to replace the only() with:
[y, y+ys.leng
On 2015-02-15 at 19:43, bearophile wrote:
void foo(in float[] data, in float[] xs, in float[] ys) @safe {
iota(0, data.length, ys.length)
.map!(xBase => iota(xBase, xBase + ys.length - 1)
.map!(y => [y, y+ys.length, y+ys.length+1, y+1])
.joiner)
On Sunday, 15 February 2015 at 18:43:35 UTC, bearophile wrote:
John Colvin:
prints things like [0, 4, 5, 1, 1, 1459971595, 1459971596, 2,
2, 1459971596, 1459971597, 3, 4, 8, 9, 5, 5, 4441427819,
4441427820, 6, 6, 4441427820, 4441427821, 7] but the output
isn't consistent, the big numbers chan
FG:
Odd... Still something is wrong. It prints:
[0, 4, 5, 1, 1, 5, 6, 2, 2, 6, 7, 3, 4, 8, 9, 5, 5, 5, 6, 6, 6,
6, 7, 7]
instead of this:
[0, 4, 5, 1, 1, 5, 6, 2, 2, 6, 7, 3, 4, 8, 9, 5, 5, 9, 10, 6,
6, 10, 11, 7]
This is less lazy and gives another result:
import std.range, std.algorithm
On Sunday, 15 February 2015 at 18:13:44 UTC, John Colvin wrote:
Simplified from something bigger:
import std.range, std.algorithm, std.stdio;
void foo(float[] data, float[] xs, float[] ys)
{
auto indices = iota(0, data.length, ys.length)
.map!(xBase =>
iota(xBase, xB
I would like to implement a variant of Sorted at
https://github.com/D-Programming-Language/phobos/pull/2793
that does completeSort of _store lazily instead of eagerly.
I guess this is a bit more complex to implement as all accessors
of LazySorted, such as opIndex, opSlice, etc (to the underlyi
This library allow to specify the internal base of the arbitrary
precision numbers( default is decimal), as well as allows
specification of the precision of floating point values. Each
floating point number precision can be read with .precision().
Also supports specification of rounding modes
On Sunday, 15 February 2015 at 19:54:45 UTC, anonymous wrote:
Reduced some more:
import std.algorithm, std.stdio;
void main()
{
int ys_length = 4;
auto indices = [0]
.map!(xBase => [0].map!(y => ys_length))
.joiner();
writeln(indices);
}
And more:
import std.stdio;
This problem appears only if one of the parameters is an
interface. Without it or using any other type as a second
parameter instead of the interface, it compiles. Also it compiles
if the passed interface is null. The example below uses
short/ushort, but I found the same behaviour for any com
On Sunday, 15 February 2015 at 23:48:50 UTC, rumbu wrote:
This problem appears only if one of the parameters is an
interface. Without it or using any other type as a second
parameter instead of the interface, it compiles. Also it
compiles if the passed interface is null. The example below
us
On Saturday, 8 November 2014 at 01:59:56 UTC, Adam D. Ruppe wrote:
If it is just that one error, you could always just comment out
the in contract and recompile.
Sorry it took so long. Extremely busy, but anyway, this is the
piece of the code that is causin the problem:
override void text(D
It checks that you don't set both text and image, because the
button doesn't support it.
19 matches
Mail list logo