Ambiguous reference to members of FileHandle


(Dmitry Shevchenko) #1

#selector(FileHandle.readToEndOfFileInBackgroundAndNotify) throws an error:
  Ambiguous use of 'readToEndOfFileInBackgroundAndNotify'

So I've tried to specify it a bit more (notice the parens):
#selector(FileHandle.readToEndOfFileInBackgroundAndNotify())
  Ambiguous reference to member
'readToEndOfFileInBackgroundAndNotify(forModes:)'

So I've tried to cast it to a Void -> Void func:
#selector(FileHandle.readToEndOfFileInBackgroundAndNotify as (Void) -> Void)
  Ambiguous reference to member
'readToEndOfFileInBackgroundAndNotify(forModes:)'

How do I settle this one?

Method signatures in the generated header are:
open func readToEndOfFileInBackgroundAndNotify(forModes modes:
[RunLoopMode]?)
open func readToEndOfFileInBackgroundAndNotify()


(Jordan Rose) #2

#selector(FileHandle.readToEndOfFileInBackgroundAndNotify as (FileHandle) -> (Void) -> Void)

Sorry. :frowning:
Jordan

···

On Feb 22, 2017, at 09:13, Dmitry Shevchenko via swift-users <swift-users@swift.org> wrote:

#selector(FileHandle.readToEndOfFileInBackgroundAndNotify) throws an error:
  Ambiguous use of 'readToEndOfFileInBackgroundAndNotify'

So I've tried to specify it a bit more (notice the parens):
#selector(FileHandle.readToEndOfFileInBackgroundAndNotify())
  Ambiguous reference to member 'readToEndOfFileInBackgroundAndNotify(forModes:)'

So I've tried to cast it to a Void -> Void func:
#selector(FileHandle.readToEndOfFileInBackgroundAndNotify as (Void) -> Void)
  Ambiguous reference to member 'readToEndOfFileInBackgroundAndNotify(forModes:)'

How do I settle this one?

Method signatures in the generated header are:
open func readToEndOfFileInBackgroundAndNotify(forModes modes: [RunLoopMode]?)
open func readToEndOfFileInBackgroundAndNotify()
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


(Jacob Bandes-Storch) #3

I just started a swift-evolution thread related to this:
https://lists.swift.org/pipermail/swift-evolution/
Week-of-Mon-20170220/032890.html

There's also a relevant bug: https://bugs.swift.org/browse/SR-2654

···

On Wed, Feb 22, 2017 at 3:10 PM, Jordan Rose via swift-users < swift-users@swift.org> wrote:

#selector(FileHandle.readToEndOfFileInBackgroundAndNotify as (FileHandle)
-> (Void) -> Void)

Sorry. :frowning:
Jordan

> On Feb 22, 2017, at 09:13, Dmitry Shevchenko via swift-users < > swift-users@swift.org> wrote:
>
> #selector(FileHandle.readToEndOfFileInBackgroundAndNotify) throws an
error:
> Ambiguous use of 'readToEndOfFileInBackgroundAndNotify'
>
> So I've tried to specify it a bit more (notice the parens):
> #selector(FileHandle.readToEndOfFileInBackgroundAndNotify())
> Ambiguous reference to member 'readToEndOfFileInBackgroundAn
dNotify(forModes:)'
>
> So I've tried to cast it to a Void -> Void func:
> #selector(FileHandle.readToEndOfFileInBackgroundAndNotify as (Void) ->
Void)
> Ambiguous reference to member 'readToEndOfFileInBackgroundAn
dNotify(forModes:)'
>
> How do I settle this one?
>
> Method signatures in the generated header are:
> open func readToEndOfFileInBackgroundAndNotify(forModes modes:
[RunLoopMode]?)
> open func readToEndOfFileInBackgroundAndNotify()
> _______________________________________________
> swift-users mailing list
> swift-users@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


(Dmitry Shevchenko) #4

Thank you.

···

On Wed, Feb 22, 2017 at 6:37 PM Jacob Bandes-Storch <jtbandes@gmail.com> wrote:

I just started a swift-evolution thread related to this:
https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170220/032890.html

There's also a relevant bug: https://bugs.swift.org/browse/SR-2654

On Wed, Feb 22, 2017 at 3:10 PM, Jordan Rose via swift-users < > swift-users@swift.org> wrote:

#selector(FileHandle.readToEndOfFileInBackgroundAndNotify as (FileHandle)
-> (Void) -> Void)

Sorry. :frowning:
Jordan

> On Feb 22, 2017, at 09:13, Dmitry Shevchenko via swift-users < > swift-users@swift.org> wrote:
>
> #selector(FileHandle.readToEndOfFileInBackgroundAndNotify) throws an
error:
> Ambiguous use of 'readToEndOfFileInBackgroundAndNotify'
>
> So I've tried to specify it a bit more (notice the parens):
> #selector(FileHandle.readToEndOfFileInBackgroundAndNotify())
> Ambiguous reference to member
'readToEndOfFileInBackgroundAndNotify(forModes:)'
>
> So I've tried to cast it to a Void -> Void func:
> #selector(FileHandle.readToEndOfFileInBackgroundAndNotify as (Void) ->
Void)
> Ambiguous reference to member
'readToEndOfFileInBackgroundAndNotify(forModes:)'
>
> How do I settle this one?
>
> Method signatures in the generated header are:
> open func readToEndOfFileInBackgroundAndNotify(forModes modes:
[RunLoopMode]?)
> open func readToEndOfFileInBackgroundAndNotify()
> _______________________________________________
> swift-users mailing list
> swift-users@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users