Re: What is "dual-context" ?

2019-09-13 Thread SrMordred via Digitalmars-d-learn
On Friday, 13 September 2019 at 04:23:47 UTC, Paul Backus wrote: On Friday, 13 September 2019 at 02:49:33 UTC, SrMordred wrote: [...] "Dual context" is the compiler feature that allows you to pass delegates as template arguments to member functions. For a long time, limitations in the fronte

Re: What is "dual-context" ?

2019-09-12 Thread Paul Backus via Digitalmars-d-learn
On Friday, 13 September 2019 at 02:49:33 UTC, SrMordred wrote: source\app.d(37,10): Error: function `app.main.match!((some) => print(some), (none) => print("none")).match` requires a dual-context, which is not yet supported by LDC I was playing with my home made "sumtypes". The code below work

What is "dual-context" ?

2019-09-12 Thread SrMordred via Digitalmars-d-learn
source\app.d(37,10): Error: function `app.main.match!((some) => print(some), (none) => print("none")).match` requires a dual-context, which is not yet supported by LDC I was playing with my home made "sumtypes". The code below works fine in dmd, but in ldc it triggers that error. x.match!(so