On Fri, Jun 24, 2016 at 2:14 AM, Vladimir.S <[email protected]> wrote:
> On 23.06.2016 19:26, Dmitri Gribenko via swift-evolution wrote:
>>
>> On Thu, Jun 23, 2016 at 9:25 AM, James Campbell via swift-evolution
>> <[email protected]> wrote:
>>>
>>> So if the function I run inside of the map has a return value of Void
>>> will
>>> that still compile ?
>>
>>
>> Yes.
>
>
> Btw, in case of
>
> let s: String? = "hi"
> s.map {print($0)}
>
> we have
> warning: result of call to 'map' is unused
> s.map {print($0)}
>
> Isn't it strange that result of call is Void, but we have a warning? Don't
> we need to suppress warning in this case?
This is a bug in the compiler. IIRC someone said they were working on it.
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <[email protected]>*/
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution