> On Jul 6, 2016, at 8:24 PM, Douglas Gregor via swift-dev
> wrote:
>
>
>> On Jun 25, 2016, at 1:19 PM, Sean Alling via swift-dev
>> wrote:
>>
>> Hi everyone,
>>
>> I’m suggesting a change to the compiler that returns an error when an object
>> 'does not conform to protocol’ to nest sub-
Hi everyone ,
I am new the the mailing list and am trying to figure out a optimal work flow.
I am currently making a change in the stdlib and building the tool
chain through the (swift/utils/build-toolchain) and debugging
toolchain via REPL and break pointing code to step from test code in
to std
Filed here: https://bugs.swift.org/browse/SR-2033
Thanks for the help! Cool to learn a new thing about Swift today :)
--
Ross LeBeau
On July 8, 2016 at 2:57:55 PM, Slava Pestov (spes...@apple.com) wrote:
"Did not infer types, try explicitly declaring them"
_
Hi Ross,
That's a good point. Do you mind filing a JIRA issue for this?
Slava
> On Jul 8, 2016, at 11:56 AM, Ross LeBeau wrote:
>
> Hi Slava,
>
> Thanks for the insight. This is what I suspected, but I wasn't sure about how
> set the team was on this concept. Currently, it seems that if the
Hi Slava,
Thanks for the insight. This is what I suspected, but I wasn't sure about
how set the team was on this concept. Currently, it seems that if the types
cannot be inferred, the type checker picks an implementation and checks
against that.
E.g., the following code works because it conforms
Hi Ross,
Swift's type inference operates at the level of a single statement. This is why
we can infer parameter and return types for single-expression closures. While
conceptually, it would not be a huge change to the type checker algorithm to
support global type inference for closures and othe
Linux swift 4.6.0-1-amd64 #1 SMP Debian 4.6.2-2 (2016-06-25) x86_64 GNU/Linux
root@swift:~# clang -v
Debian clang version 3.6.2-3 (tags/RELEASE_362/final) (based on LLVM 3.6.2)
Target: x86_64-pc-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8
> On Jul 7, 2016, at 8:17 PM, Joe Groff wrote:
>> On Jul 7, 2016, at 5:26 PM, John McCall wrote:
>>
>> Suppose we are calling a function that is generic over T, where T:
>> AnyObject. This comes up when e.g. calling an initializer for an ObjC
>> generic class.
>>
>> Today we allow conversion
It seems that the compiler fails to infer the type of an anonymous function
if the function contains more than one statement. For example, this works:
let a = [[1,2],[3],[4,5,6]]
var b: [Int]
b = a.flatMap { elem in
return elem
}
But this fails with an error "cannot convert return expression of