[swift-dev] Breaking brain
Chris Eidhof
chris at eidhof.nl
Wed Feb 1 04:33:41 CST 2017
The error tells you it's not a function, but a String. In other words, it's
a property of filemgr. Try calling it without the parentheses :).
On Wed, Feb 1, 2017 at 10:34 AM, Roman Pastushkov via swift-dev <
swift-dev at swift.org> wrote:
> Hello everyone!
>
> I iam trying compile 4 lines prog on linux:
> import Foundation
> let filemgr = FileManager.default
> let path = filemgr.currentDirectoryPath()
> print(path)
>
> and get erorr /main.swift:3:40: error: cannot call value of non-function
> type 'String'
> let path = filemgr.currentDirectoryPath()
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
>
> <unknown>:0: error: build had 1 command failures
>
>
>
> why?
> Roman Pastushkov
> xnucleargeminix at aol.com
>
> _______________________________________________
> swift-dev mailing list
> swift-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev
>
>
--
Chris Eidhof
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20170201/7bac9728/attachment.html>
More information about the swift-dev
mailing list