<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">This seems like it’s running through the same check that disallows defining and calling a closure </div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #ba2da2" class="">let</span><span style="font-variant-ligatures: no-common-ligatures" class=""> randomFunc : () -> () = randomFunc()</span></div></div><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 30, 2017, at 2:37 PM, Michael Gubik via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Example that does not compile:<br class=""><br class=""> let randomArray = randomArray(withCapacity: 4096)<br class=""><br class="">Compiler error: “Variable used within its own initial value”<br class="">The variable name unfortunately clashes with the function name.<br class=""><br class="">This problem forces the developer to think about an alternative name.<br class="">IMHO that’s suboptimal since many times the most canonical naming would be one where these two go by the same name.<br class=""><br class="">It’s not a big problem in practice but I wonder if there are plans to change this?<br class=""><br class=""><br class="">Thanks,<br class="">Michael Gubik<br class=""><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></div></blockquote></div><br class=""></body></html>