digitalmars.D.learn - Get compilation errors within opDispatch?
- cc (11/11) Feb 17 2020 Is there any way to see the compilation errors that occurred
- =?UTF-8?Q?Ali_=c3=87ehreli?= (3/18) Feb 17 2020 Try dmd command line switch -verrors=3Dspec.
- Adam D. Ruppe (5/8) Feb 17 2020 It sometimes helps to write it out log-form
- cc (5/11) Feb 17 2020 This worked, thank you!
Is there any way to see the compilation errors that occurred within an opDispatch template? struct Foo { void opDispatch(string s, SA...)(SA sargs) { literally anything; } } Foo foo; foo.hello(5); Result: Error: no property `hello` for type `Foo` Desired result: Error: undefined identifier `literally`
Feb 17 2020
On 2/17/20 8:41 AM, cc wrote:Is there any way to see the compilation errors that occurred within an =opDispatch template? =20 struct Foo { =C2=A0=C2=A0=C2=A0=C2=A0void opDispatch(string s, SA...)(SA sargs) { =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 literally anything; =C2=A0=C2=A0=C2=A0=C2=A0} } Foo foo; foo.hello(5); =20 Result:=C2=A0 Error: no property `hello` for type `Foo` =20 Desired result:=C2=A0 Error: undefined identifier `literally` =20Try dmd command line switch -verrors=3Dspec. Ali
Feb 17 2020
On Monday, 17 February 2020 at 16:41:54 UTC, cc wrote:Foo foo; foo.hello(5); Result: Error: no property `hello` for type `Foo`It sometimes helps to write it out log-form foo.opDispatch!"hello"(5); should give the full error. this btw is one of the most annoying missing errors in d...
Feb 17 2020
On Monday, 17 February 2020 at 17:01:12 UTC, Adam D. Ruppe wrote:It sometimes helps to write it out log-form foo.opDispatch!"hello"(5); should give the full error. this btw is one of the most annoying missing errors in d...This worked, thank you! On Monday, 17 February 2020 at 16:45:53 UTC, Ali Çehreli wrote:Try dmd command line switch -verrors=spec. AliThis technically also worked, but the error was buried on line 5431 of the 9857-line result.
Feb 17 2020