Project-Swift.h file failed to compile due to "Elaborated type refers to a typedef" error.

Summary:

I have added the StreamDelegate method "public func stream(_ aStream: Stream, handle eventCode: Stream.Event)" to my swift class and compiled the project. While generating Project-Swift.h, complier failed to compile and show error as "Elaborated type refers to a typedef".


Steps to Reproduce:

1. Add StreamDelegate to your swift class.

2. Add public func stream(_ aStream: Stream, handle eventCode: Stream.Event) to your class.

3. Compile the project.


Expected Results:

Project-Swift.h file should be compiled properly.


Actual Results:

error on Project-Swift.h file at the line : - (void)stream:(NSStream * _Nonnull)aStream handleEvent:(enum NSStreamEvent)eventCode;


iOS Version: iOS 10 beta 1

Xcode Version: Xcode 8.0 beta

Swift Version: 3.0


Thanks!

I found a work around to avoid the above error by adding the

@nonobjc
keyword in front of "
func stream(_ aStream: Stream, handle eventCode: Stream.Event)
" in my Swift class.


So that the compiler doesn't included that method in

Project-Swift.h
file and there is no error in
Project-Swift.h
while compiling.


@nonobjc public func stream(_ aStream: Stream, handle eventCode: Stream.Event) {  }


I don't think this will be the proper solution for above issue. But for me I don't want to call the above delegate method from my Objective-C class.


is there any other solution to avoid the "Elaborated type refers to a typedef" error?


Thanks!

Project-Swift.h file failed to compile due to "Elaborated type refers to a typedef" error.
 
 
Q