Are interfaces supported in Better C mode?
Paul Backus
snarwin at gmail.com
Sun Nov 15 01:43:00 UTC 2020
On Sunday, 15 November 2020 at 01:30:24 UTC, Dibyendu Majumdar
wrote:
> On Sunday, 15 November 2020 at 01:00:27 UTC, kinke wrote:
>> On Saturday, 14 November 2020 at 21:46:38 UTC, Dibyendu
>> Majumdar wrote:
>>> Well this compiles but doesn't link.
>>
>> This works with LDC:
>>
>> extern (C) void main() {
>> scope b = new B;
>> b.sayHello();
>> }
>
> I thought new isn't supported in better C mode ?
`scope` causes the class instance to be allocated on the stack.
Source: https://dlang.org/spec/expression.html#new_expressions
More information about the Digitalmars-d
mailing list