yanagiba / swift-ast

A Swift AST parser and visitor that is written in Swift.
Apache License 2.0
355 stars 40 forks source link

Gets confused by a typealias inside of a protocol #92

Open rudro opened 5 years ago

rudro commented 5 years ago

Issue Summary

The sample code included is complete. Run with swift foo.swift to verify this is valid code. Looks like the typealias line inside the protocol causes the error as it does not appear to be a "typical" protocol member.

Environment

Reproduction Steps

[Detailed steps to reproduce the issue.]

Sample code ``` protocol MyProtocol { typealias Number = Int func update(value: Number) } print("hello") ``` Command to run `swift-ast` with the code above: `swift-ast /Users/rudro/Downloads/foo.swift`

Expected Result

What do you expect to happen as a result of the reproduction steps?

Actual Behavior

What currently happens as a result of the reproduction steps?

/Users/rudro/Downloads/foo.swift:2:5 fatal: badProtocolMember

Even Better

Is your project open sourced? If yes, can you point us to your repository? If not, is it possible to make a small project that fails the Travis CI? If not, can you create a gist with your sample code for us?

ryuichi-assistant commented 2 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment.