Re: interface inference with delegates/functions

2025-02-04 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, February 4, 2025 5:53:02 AM MST axricard via Digitalmars-d-learn wrote: > Basically the same question than > https://forum.dlang.org/post/aoltazzfmnztsyatf...@forum.dlang.org > but with functions/delegates and inferred return types: > > ``` D > interface I { > bool check(); >

Re: Ldc ImportC preprocessor failure (wrong option syntax) on Windows

2025-02-04 Thread Bastiaan Veelo via Digitalmars-d-learn
On Tuesday, 4 February 2025 at 10:15:23 UTC, Bastiaan Veelo wrote: On Tuesday, 4 February 2025 at 09:57:27 UTC, Richard (Rikki) Andrew Cattermole wrote: On 04/02/2025 10:50 PM, Bastiaan Veelo wrote: Hi, On my personal machine everything works fine, but our CI build machine suffers from this e

Ldc ImportC preprocessor failure (wrong option syntax) on Windows

2025-02-04 Thread Bastiaan Veelo via Digitalmars-d-learn
Hi, On my personal machine everything works fine, but our CI build machine suffers from this error: ``` clang-cl.exe: warning: unknown argument ignored in clang-cl '-target' (did you mean '--target='?) [-Wunknown-argument] clang-cl.exe: error: no such file or directory: 'x86_64-pc-windows-msv

Re: Ldc ImportC preprocessor failure (wrong option syntax) on Windows

2025-02-04 Thread Bastiaan Veelo via Digitalmars-d-learn
On Tuesday, 4 February 2025 at 09:57:27 UTC, Richard (Rikki) Andrew Cattermole wrote: On 04/02/2025 10:50 PM, Bastiaan Veelo wrote: Hi, On my personal machine everything works fine, but our CI build machine suffers from this error: ``` clang-cl.exe: warning: unknown argument ignored in clang-

interface inference with delegates/functions

2025-02-04 Thread axricard via Digitalmars-d-learn
Basically the same question than https://forum.dlang.org/post/aoltazzfmnztsyatf...@forum.dlang.org but with functions/delegates and inferred return types: ``` D interface I { bool check(); } class A : I { bool check() =>true; } class B : I { bool check() =>false; } void

Re: help with prime pairs code

2025-02-04 Thread Jabari Zakiya via Digitalmars-d-learn
On Monday, 3 February 2025 at 04:59:43 UTC, monkyyy wrote: On Monday, 3 February 2025 at 04:15:09 UTC, Jabari Zakiya wrote: I translated this Ruby code: FYI. This code finds all the prime pairs that sum to n for all even integers n > 2. It (Ruby code) is included in a paper I just released

Solved: Ldc ImportC preprocessor failure (wrong option syntax) on Windows

2025-02-04 Thread Bastiaan Veelo via Digitalmars-d-learn
On Tuesday, 4 February 2025 at 10:54:12 UTC, Bastiaan Veelo wrote: C:\Program Files\LLVM\bin\clang-cl.exe /nologo /P -target Found it. The CI machine had LLVM installed, where it found `clang-cl.exe`. After uninstalling LLVM, `cl.exe` from Microsoft is used instead, which works. -- Bastiaan

Re: Ldc ImportC preprocessor failure (wrong option syntax) on Windows

2025-02-04 Thread Bastiaan Veelo via Digitalmars-d-learn
On Tuesday, 4 February 2025 at 09:57:27 UTC, Richard (Rikki) Andrew Cattermole wrote: Which means this is a bug. Reported https://github.com/ldc-developers/ldc/issues/4834 Thanks! -- Bastiaan.

Re: Ldc ImportC preprocessor failure (wrong option syntax) on Windows

2025-02-04 Thread Bastiaan Veelo via Digitalmars-d-learn
On Tuesday, 4 February 2025 at 10:15:23 UTC, Bastiaan Veelo wrote: It could be a bug, but locally I use the same version (ldc 1.39.0) and it works fine... version 1.40.0 (DMD v2.110.0, LLVM 19.1.3) has the same issue.

Re: Ldc ImportC preprocessor failure (wrong option syntax) on Windows

2025-02-04 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 04/02/2025 10:50 PM, Bastiaan Veelo wrote: Hi, On my personal machine everything works fine, but our CI build machine suffers from this error: ``` clang-cl.exe: warning: unknown argument ignored in clang-cl '- target' (did you mean '--target='?) [-Wunknown-argument] clang-cl.exe: error: n