It seems like I managed to solve it.
All the chain of properties now capturing a generic value type T.
And finally the most inner associative array will handle the
implicit cast.
Maybe that extra implicit () got confused when the types are
same, but the aliases to those types are different.
a property it is just plain broken and has been the whole
time.
Don't expect it to ever be fixed.
At least my 5 hour trying-and-failing session comes to a logical
end here :D
Thank You!
it into a temp variable or inside a with(), then both
form works ok.
Bit when I try to write the whole thing in a single nice
expression: No property `_size` for the type `void`.
In the documentation I see this:
- For the expression typeof(exp) where exp is an @property
function, the type is the return
On Friday, 26 May 2023 at 21:00:20 UTC, realhet wrote:
Only the extra () let it compile successfuly.
No way to fix it. If the function takes an extra argument you can
kinda trick it but for zero arg function pointer return from a
property it is just plain broken and has been the whole time
of this is BlobLoader
'lod0' is a mixin generated @property getter. It calls a template
function in the karcSamples class: _getBlob!"lod0"(key) this
also calls an internal struct called DataLoggerBlobAA which is
acting like an associative array. That iternal struct overloads
th
https://issues.dlang.org/show_bug.cgi?id=10886
--- Comment #6 from Dlang Bot ---
dlang/dmd pull request #14992 "merge stable" was merged into master:
- 141c5683f69d5a483d6f1647950249510a025961 by Razvan Nitu:
Fix Issue 21288 & 10886 - incorrect this pointer (#14969)
https://issues.dlang.org/show_bug.cgi?id=10886
Dlang Bot changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://issues.dlang.org/show_bug.cgi?id=10886
Dlang Bot changed:
What|Removed |Added
Keywords||pull
--- Comment #4 from Dlang Bot ---
https://issues.dlang.org/show_bug.cgi?id=22939
Basile-z changed:
What|Removed |Added
Component|dmd |phobos
--
https://issues.dlang.org/show_bug.cgi?id=17474
Iain Buclaw changed:
What|Removed |Added
Priority|P3 |P2
--
https://issues.dlang.org/show_bug.cgi?id=11120
Iain Buclaw changed:
What|Removed |Added
Priority|P2 |P3
--
https://issues.dlang.org/show_bug.cgi?id=8814
Iain Buclaw changed:
What|Removed |Added
Priority|P2 |P3
--
https://issues.dlang.org/show_bug.cgi?id=10886
Iain Buclaw changed:
What|Removed |Added
Priority|P2 |P3
--
https://issues.dlang.org/show_bug.cgi?id=10698
Iain Buclaw changed:
What|Removed |Added
Priority|P2 |P3
--
https://issues.dlang.org/show_bug.cgi?id=8000
Iain Buclaw changed:
What|Removed |Added
Priority|P2 |P3
--
https://issues.dlang.org/show_bug.cgi?id=8162
Iain Buclaw changed:
What|Removed |Added
Priority|P2 |P3
--
https://issues.dlang.org/show_bug.cgi?id=6294
Iain Buclaw changed:
What|Removed |Added
Priority|P2 |P3
--
https://issues.dlang.org/show_bug.cgi?id=5707
Iain Buclaw changed:
What|Removed |Added
Priority|P2 |P4
--
https://issues.dlang.org/show_bug.cgi?id=7970
Iain Buclaw changed:
What|Removed |Added
Priority|P2 |P4
--
https://issues.dlang.org/show_bug.cgi?id=8161
Iain Buclaw changed:
What|Removed |Added
Priority|P2 |P4
--
https://issues.dlang.org/show_bug.cgi?id=10867
Iain Buclaw changed:
What|Removed |Added
Priority|P2 |P4
--
https://issues.dlang.org/show_bug.cgi?id=9062
Iain Buclaw changed:
What|Removed |Added
Priority|P2 |P4
--
https://issues.dlang.org/show_bug.cgi?id=17350
Iain Buclaw changed:
What|Removed |Added
Priority|P1 |P3
--
https://issues.dlang.org/show_bug.cgi?id=22769
Iain Buclaw changed:
What|Removed |Added
Priority|P1 |P3
--
https://issues.dlang.org/show_bug.cgi?id=12595
Iain Buclaw changed:
What|Removed |Added
Priority|P1 |P3
--
https://issues.dlang.org/show_bug.cgi?id=18087
Iain Buclaw changed:
What|Removed |Added
Priority|P1 |P3
--
https://issues.dlang.org/show_bug.cgi?id=17865
Iain Buclaw changed:
What|Removed |Added
Priority|P1 |P3
--
https://issues.dlang.org/show_bug.cgi?id=19588
Iain Buclaw changed:
What|Removed |Added
Priority|P1 |P3
--
https://issues.dlang.org/show_bug.cgi?id=23451
Iain Buclaw changed:
What|Removed |Added
Priority|P1 |P3
--
https://issues.dlang.org/show_bug.cgi?id=21466
Iain Buclaw changed:
What|Removed |Added
Priority|P1 |P3
--
https://issues.dlang.org/show_bug.cgi?id=15038
Iain Buclaw changed:
What|Removed |Added
Priority|P1 |P4
--
https://issues.dlang.org/show_bug.cgi?id=23507
Dlang Bot changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://issues.dlang.org/show_bug.cgi?id=23507
Dlang Bot changed:
What|Removed |Added
Keywords||pull
--- Comment #1 from Dlang Bot ---
https://issues.dlang.org/show_bug.cgi?id=23507
Issue ID: 23507
Summary: Socket.blocking property incorrect on new Socket on
Windows
Product: D
Version: D2
Hardware: All
OS: Windows
Status: NEW
https://issues.dlang.org/show_bug.cgi?id=17240
RazvanN changed:
What|Removed |Added
Status|NEW |RESOLVED
CC|
https://issues.dlang.org/show_bug.cgi?id=23451
Mario Kroeplin changed:
What|Removed |Added
Keywords||industry
CC|
https://issues.dlang.org/show_bug.cgi?id=23451
Issue ID: 23451
Summary: Static function declared in with scope cannot access
property on type alias in with expression type
Product: D
Version: D2
Hardware: x86_64
||razvan.nitu1...@gmail.com
Resolution|--- |WORKSFORME
--- Comment #3 from RazvanN ---
This now yields:
test.d(3): Error: no property `nsecs` for `currTime()` of type
`core.time.MonoTimeImpl!ClockType.normal`
Which is the correct error message.
--
https://issues.dlang.org/show_bug.cgi?id=14916
RazvanN changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
RazvanN ---
The problem is that we now have 2 overloads and none match, therefore the
compiler simply goes with a generic error message "no property foo for s". This
is the correct behavior since the compiler does not have sufficient information
to distinguish which overload is less wrong
|--- |FIXED
--- Comment #4 from Dlang Bot ---
dlang/dlang.org pull request #3356 "Fix Issue 22141 - Property .capacity is not
listed in the array prope…" was merged into master:
- 4ab0ac795fb65a083e4de9f8b7b38c4385f20920 by RazvanN7:
Fix Issue 22141 - Property .capacity is
https://issues.dlang.org/show_bug.cgi?id=18087
Nick Treleaven changed:
What|Removed |Added
CC||n...@geany.org
--- Comment #2 from Nick
On Friday, 19 August 2022 at 16:36:24 UTC, MyNameHere wrote:
On Friday, 19 August 2022 at 14:30:50 UTC, kinke wrote:
Oh and `DevicePath()` is a convenience member returning a
pointer to the 'dynamic array' (as the array decays to a
pointer in C too), so no need to fiddle with `.offsetof` and
On 8/19/22 12:36 PM, MyNameHere wrote:
On Friday, 19 August 2022 at 14:30:50 UTC, kinke wrote:
Oh and `DevicePath()` is a convenience member returning a pointer to
the 'dynamic array' (as the array decays to a pointer in C too), so no
need to fiddle with `.offsetof` and computing the pointer
On Friday, 19 August 2022 at 14:30:50 UTC, kinke wrote:
Oh and `DevicePath()` is a convenience member returning a
pointer to the 'dynamic array' (as the array decays to a
pointer in C too), so no need to fiddle with `.offsetof` and
computing the pointer manually.
I am using ```-BetterC```,
On Friday, 19 August 2022 at 13:49:08 UTC, MyNameHere wrote:
Thank you, that seems to have resolved the issue, though I wish
these sorts of problems would stop cropping up, they are
souring the experience with the language.
Oh and `DevicePath()` is a convenience member returning a pointer
to
On Friday, 19 August 2022 at 14:22:04 UTC, Steven Schveighoffer
wrote:
On 8/19/22 9:49 AM, MyNameHere wrote:
Thank you, that seems to have resolved the issue, though I
wish these sorts of problems would stop cropping up, they are
souring the experience with the language.
Most likely that
On 8/19/22 9:49 AM, MyNameHere wrote:
Thank you, that seems to have resolved the issue, though I wish these
sorts of problems would stop cropping up, they are souring the
experience with the language.
Most likely that "member" is a macro in C. D doesn't have macros, so it
uses properties.
Thank you, that seems to have resolved the issue, though I wish
these sorts of problems would stop cropping up, they are souring
the experience with the language.
It's a method returning a `CHAR*` - `_DevicePath` is the actual
member. I guess it's a dynamically sized struct, which cannot be
mapped directly to D, hence this representation.
I am receiving this error:
```
Error: no property `offsetof` for type `char*`
```
from this snippet:
```d
import core.sys.windows.setupapi;
void main() {
SP_DEVICE_INTERFACE_DETAIL_DATA_A DeviceInterfaceDetail;
uint Offset = DeviceInterfaceDetail.DevicePath.offsetof;
}
```
You may
---
@RazvanN7 updated dlang/dlang.org pull request #3356 "Fix Issue 22141 -
Property .capacity is not listed in the array prope…" fixing this issue:
- Fix Issue 22141 - Property .capacity is not listed in the array properties
https://github.com/dlang/dlang.org/pull/3356
--
https://issues.dlang.org/show_bug.cgi?id=22141
RazvanN changed:
What|Removed |Added
CC||razvan.nitu1...@gmail.com
--- Comment #2 from
https://issues.dlang.org/show_bug.cgi?id=22141
Don Allen changed:
What|Removed |Added
CC||donaldcallen1...@icloud.com
--- Comment #1 from
https://issues.dlang.org/show_bug.cgi?id=17865
bitwise changed:
What|Removed |Added
CC|nicolas.jincher...@gmail.co |
|m |
https://issues.dlang.org/show_bug.cgi?id=22939
--- Comment #4 from Dlang Bot ---
dlang/phobos pull request #8425 "merge stable" was merged into master:
- ba92563a0d69d07f182ea7305bb6def1791a7bd8 by Dennis Korpel:
Fix issue 22939 - bad error message: Error: no property `msg` for ty
|--- |FIXED
--- Comment #3 from Dlang Bot ---
dlang/phobos pull request #8424 "Fix issue 22939 - bad error message: Error: no
property `msg` for typ…" was merged into stable:
- 2f7ec47051201fe7f0111d559e993860c56585db by Dennis Korpel:
Fix issue 22939 - bad error message: Error: n
---
@dkorpel created dlang/phobos pull request #8424 "Fix issue 22939 - bad error
message: Error: no property `msg` for typ…" fixing this issue:
- Fix issue 22939 - bad error message: Error: no property `msg` for type
`string`
https://github.com/dlang/phobos/pull/8424
--
https://issues.dlang.org/show_bug.cgi?id=22939
Dennis changed:
What|Removed |Added
CC||dkor...@live.nl
--- Comment #1 from Dennis ---
https://issues.dlang.org/show_bug.cgi?id=22940
Issue ID: 22940
Summary: defect: Error: no property `_0L` for type `int`
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
https://issues.dlang.org/show_bug.cgi?id=22939
Issue ID: 22939
Summary: bad error message: Error: no property `msg` for type
`string`
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
https://issues.dlang.org/show_bug.cgi?id=22769
--- Comment #8 from anonymous4 ---
If deprecation goes successfully, it may open possibility for implementation of
strict properties.
--
https://issues.dlang.org/show_bug.cgi?id=22769
--- Comment #7 from anonymous4 ---
But, yeah, presumably it should deprecate a bunch of stuff first.
--
https://issues.dlang.org/show_bug.cgi?id=22769
--- Comment #6 from anonymous4 ---
Currently it works according to optional parentheses, which is not ambiguous,
since strict properties obviously aren't implemented. If you want to introduce
strict properties gradually, it's a DIP too, what to
https://issues.dlang.org/show_bug.cgi?id=22769
--- Comment #5 from Vladimir Panteleev ---
It has been a while, and I think the strict properties DIPs were about entirely
forbidding "someProperty()"; whereas in this case, it may make more sense for
incremental improvement in the form of fixing
https://issues.dlang.org/show_bug.cgi?id=22769
--- Comment #4 from anonymous4 ---
This is called "strict properties" and requires a DIP, especially since
previous DIPs about this went nowhere and people in general gave up on sorting
this out. But maybe it's a good time for a new DIP. Among other
https://issues.dlang.org/show_bug.cgi?id=22769
--- Comment #3 from Basile-z ---
Thanks for the explanations, I see the issue now, that is that opCall is not
tried.
--
https://issues.dlang.org/show_bug.cgi?id=22769
--- Comment #2 from Vladimir Panteleev ---
(In reply to Basile-z from comment #1)
> what is the background idea ?
Making @property do its job
> Is this proposal a way to have opCall called without explicit CallExp ?
No. () is the C
---
what is the background idea ?
Is this proposal a way to have opCall called without explicit CallExp ?
---
struct S
{
void opCall() @property
{
}
}
S s;
@property S fun()
{
return s;
}
void main()
{
s(); // ok
s; // using @property of opCall, that cannot work
fun
https://issues.dlang.org/show_bug.cgi?id=22769
Issue ID: 22769
Summary: `fun()` where fun is a property which returns an
object with opCall should call opCall
Product: D
Version: D2
Hardware: All
OS: All
https://issues.dlang.org/show_bug.cgi?id=12595
Dennis changed:
What|Removed |Added
CC||dkor...@live.nl
--- Comment #3 from Dennis ---
On 12/15/21 9:41 AM, Stanislav Blinov wrote:
On Wednesday, 15 December 2021 at 11:36:41 UTC, Manfred Nowak wrote:
On Tuesday, 14 December 2021 at 08:28:01 UTC, WebFreak001 wrote:
[...]
Alternatively, remove the template `()` from your `struct Header`
What is the semantic sense of a template
On Wednesday, 15 December 2021 at 11:36:41 UTC, Manfred Nowak
wrote:
On Tuesday, 14 December 2021 at 08:28:01 UTC, WebFreak001 wrote:
[...]
Alternatively, remove the template `()` from your `struct
Header`
What is the semantic sense of a template having no parameters?
Although the
On 12/15/21 6:36 AM, Manfred Nowak wrote:
On Tuesday, 14 December 2021 at 08:28:01 UTC, WebFreak001 wrote:
[...]
Alternatively, remove the template `()` from your `struct Header`
What is the semantic sense of a template having no parameters?
Although the documentation declares such a
On Wednesday, 15 December 2021 at 11:36:41 UTC, Manfred Nowak
wrote:
On Tuesday, 14 December 2021 at 08:28:01 UTC, WebFreak001 wrote:
[...]
Alternatively, remove the template `()` from your `struct
Header`
What is the semantic sense of a template having no parameters?
Although the
On Wednesday, 15 December 2021 at 11:36:41 UTC, Manfred Nowak
wrote:
On Tuesday, 14 December 2021 at 08:28:01 UTC, WebFreak001 wrote:
[...]
Alternatively, remove the template `()` from your `struct
Header`
What is the semantic sense of a template having no parameters?
Although the
On Tuesday, 14 December 2021 at 08:28:01 UTC, WebFreak001 wrote:
[...]
Alternatively, remove the template `()` from your `struct
Header`
What is the semantic sense of a template having no parameters?
Although the documentation declares such a template to be
syntactically correct, not a
s to inout
property (#13291)
The cast expression was trying an 'alias this' but without error gagging.
https://github.com/dlang/dmd/pull/13421
--
On Tuesday, 14 December 2021 at 08:12:04 UTC, zoujiaqing wrote:
My code:
```D
module http.HttpRequest;
import std.container;
import std.array : Appender;
struct HttpRequest
{
struct Header()
{
Appender!string name;
Appender!string value;
}
string method;
My code:
```D
module http.HttpRequest;
import std.container;
import std.array : Appender;
struct HttpRequest
{
struct Header()
{
Appender!string name;
Appender!string value;
}
string method;
string uri;
int versionMajor = 0;
int versionMinor = 0;
|--- |FIXED
--- Comment #3 from Dlang Bot ---
dlang/dmd pull request #13291 "Fix Issue 21073 - Rebindable does not work when
class has alias this to inout property" was merged into stable:
- a7ce6929f6708debfae3e3854bed5f1c02cdf1a0 by Boris Carvajal:
Fix Issue 21073 - Rebin
---
@BorisCarvajal created dlang/dmd pull request #13291 "Fix Issue 21073 -
Rebindable does not work when class has alias this to inout property" fixing
this issue:
- Fix Issue 21073 - Rebindable does not work when class has alias this to inout
property
The cast expression was trying
||dkor...@live.nl
Resolution|--- |WONTFIX
--- Comment #4 from Dennis ---
-property was deprecated in 2.069.2 and removed in 2.082.1, the example
compiles today.
--
On Saturday, 4 September 2021 at 23:57:09 UTC, jfondren wrote:
You're returning a copy of a slice, so if this compiled nothing
useful would happen anyway. This works if `whatever()` returns
`ref dstring` instead, with no other changes. Search
https://dlang.org/spec/function.html for 'lvalue'
On Saturday, 4 September 2021 at 23:33:39 UTC, someone wrote:
```d
public class cSomething {
private:
dstring pstrWhatever = null;
public:
@safe dstring whatever() { return pstrWhatever; }
@safe void whatever(const dstring lstrWhatever) {
pstrWhatever = lstrWhatever; }
}
```d
public class cSomething {
private:
dstring pstrWhatever = null;
public:
@safe dstring whatever() { return pstrWhatever; }
@safe void whatever(const dstring lstrWhatever) { pstrWhatever
= lstrWhatever; }
}
void main() {
cSomething lobjSomething = new cSomething();
https://issues.dlang.org/show_bug.cgi?id=21073
ajiesk...@gmail.com changed:
What|Removed |Added
CC||ajiesk...@gmail.com
.
No. A default property can be another object altogether. The
best use case I can think of is a default collection for a
class such as lobjComputers.computers in my example.
That really isn't what alias this is used for commonly. I.e.
I didn't know alias this even existed a month ago so I cannot
On Sunday, 8 August 2021 at 04:51:48 UTC, someone wrote:
On Sunday, 8 August 2021 at 04:30:12 UTC, rikki cattermole
wrote:
So a field that will automatically be resolved to as part of
the behavior of generated toString methods.
No. A default property can be another object altogether
On Sunday, 8 August 2021 at 04:30:12 UTC, rikki cattermole wrote:
So a field that will automatically be resolved to as part of
the behavior of generated toString methods.
No. A default property can be another object altogether. The best
use case I can think of is a default collection
So a field that will automatically be resolved to as part of the
behavior of generated toString methods.
That really isn't what alias this is used for commonly. I.e.
struct ValueReference {
private {
SomethingElse* impl;
}
bool isNull() { return impl is
ou, I mean the community, think is it a good idea
to file a DIP to eventually get a new attribute to
unambiguously label a class' default property ?
Can you please explain what a "default property" is? I have
never encountered such a thing in any other programming
language.
```d
pu
eventually get a new attribute to unambiguously
label a class' default property ?
Can you please explain what a "default property" is? I have never
encountered such a thing in any other programming language.
el a class' default property ?
eg: @default string whatever(...);
eg: @default @property string whatever(...); /// if @property
survives; that is
... or whatever you consider it should be named ?
Besides, alias this was not implemented to handle default
properties albeit it seems it is commo
https://issues.dlang.org/show_bug.cgi?id=22141
Issue ID: 22141
Summary: Property .capacity is not listed in the array
properties section
Product: D
Version: D2
Hardware: x86
OS: Windows
Status
On Friday, 9 July 2021 at 11:04:23 UTC, Dennis wrote:
On Friday, 9 July 2021 at 10:19:59 UTC, Виталий Фадеев wrote:
It possible in current version 2.097 ?
If you `import std.typecons` you can do:
```D
element.border = tuple(1, solid).expand;
```
But it's not pretty. I suggest either calling
On Friday, 9 July 2021 at 10:19:59 UTC, Виталий Фадеев wrote:
It possible in current version 2.097 ?
If you `import std.typecons` you can do:
```D
element.border = tuple(1, solid).expand;
```
But it's not pretty. I suggest either calling the function
regularly, or combing all settings in a
On Friday, 9 July 2021 at 10:19:59 UTC, Виталий Фадеев wrote:
I want this feature in D:
```
element.border = 1, solid;
struct Element
{
@property
void border( int width, BorderStyle style )
{
this.borderWidth = width;
this.borderStyle = style;
}
}
```
Description
I want this feature in D:
```
element.border = 1, solid;
struct Element
{
@property
void border( int width, BorderStyle style )
{
this.borderWidth = width;
this.borderStyle = style;
}
}
```
Description:
```
element.border = 1, solid;
```
will rewriten
On Tuesday, 6 July 2021 at 10:06:11 UTC, Jack Applegame wrote:
Here's another way using ``` std.typecons ```
```d
import std.stdio;
import std.typecons;
alias input = Typedef!int; //new code
struct Field {
void opAssign(int a) {
writefln("Field.opAssign(%s)", a);
}
}
struct
1 - 100 of 3128 matches
Mail list logo