Re: method has no return statement with switch

2015-11-07 Thread crimaniak via Digitalmars-d-learn
On Saturday, 7 November 2015 at 06:02:49 UTC, BBaz wrote: On Saturday, 7 November 2015 at 00:21:57 UTC, crimaniak wrote: [...] url.Cache.UrlCache.doRequest has no return statement, but is expected to return a value of type string [...] public string doRealRequest(string url, Method

Re: method has no return statement with switch

2015-11-06 Thread BBaz via Digitalmars-d-learn
On Saturday, 7 November 2015 at 00:30:29 UTC, crimaniak wrote: On Saturday, 7 November 2015 at 00:27:02 UTC, Adam D. Ruppe wrote: On Saturday, 7 November 2015 at 00:21:57 UTC, crimaniak wrote: Inserting dummy return statement doesn't help. final switch / switch with default - no matter. Try

method has no return statement with switch

2015-11-06 Thread crimaniak via Digitalmars-d-learn
Hi! I have the error message: source/url.cache.d(20,16): Error: function url.Cache.UrlCache.doRequest has no return statement, but is expected to return a value of type string Inserting dummy return statement doesn't help. final switch / switch with default - no matter. As I understand

Re: method has no return statement with switch

2015-11-06 Thread crimaniak via Digitalmars-d-learn
On Saturday, 7 November 2015 at 00:27:02 UTC, Adam D. Ruppe wrote: On Saturday, 7 November 2015 at 00:21:57 UTC, crimaniak wrote: Inserting dummy return statement doesn't help. final switch / switch with default - no matter. Try inserting assert(0); instead of a dummy return. Done, no

Re: method has no return statement with switch

2015-11-06 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 7 November 2015 at 00:21:57 UTC, crimaniak wrote: Inserting dummy return statement doesn't help. final switch / switch with default - no matter. Try inserting assert(0); instead of a dummy return.

Re: method has no return statement with switch

2015-11-06 Thread tcak via Digitalmars-d-learn
On Saturday, 7 November 2015 at 00:21:57 UTC, crimaniak wrote: Hi! I have the error message: source/url.cache.d(20,16): Error: function url.Cache.UrlCache.doRequest has no return statement, but is expected to return a value of type string [...] Because the "switch" is marked as "final",

Re: method has no return statement with switch

2015-11-06 Thread BBaz via Digitalmars-d-learn
On Saturday, 7 November 2015 at 00:21:57 UTC, crimaniak wrote: [...] url.Cache.UrlCache.doRequest has no return statement, but is expected to return a value of type string [...] public string doRealRequest(string url, Method method) You posted the wrong code sample: your code shows