Re: Question re specific implicit type coercion

2021-10-18 Thread Don Allen via Digitalmars-d-learn
On Monday, 18 October 2021 at 15:58:35 UTC, Don Allen wrote: On Monday, 18 October 2021 at 15:34:45 UTC, Paul Backus wrote: On Monday, 18 October 2021 at 15:04:11 UTC, Don Allen wrote: Section 12.17 of the Language Reference does not indicate any circumstance in which a dynamic array, which the

Re: Question re specific implicit type coercion

2021-10-18 Thread Don Allen via Digitalmars-d-learn
On Monday, 18 October 2021 at 15:34:45 UTC, Paul Backus wrote: On Monday, 18 October 2021 at 15:04:11 UTC, Don Allen wrote: Section 12.17 of the Language Reference does not indicate any circumstance in which a dynamic array, which the literal is, is implicitly coerced to a pointer. This is a

Question re specific implicit type coercion

2021-10-18 Thread Don Allen via Digitalmars-d-learn
I am calling a C function, described in D as extern (C) GtkWidget* gtk_menu_item_new_with_label (immutable(char)*); I call it like this accounts_menu_item = gtk_menu_item_new_with_label("New account (Ctrl-n)"); The type of the string literal in the call is immutable(char)[]. The type of t