Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-9316] libSyntax: @convention function type is not supported in all contexts #51786

Closed
dan-zheng opened this issue Nov 21, 2018 · 3 comments
Closed
Labels
attributes Feature: Declaration and type attributes bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. @convention Feature → attributes: the @convention attribute function types Feature → types: function types † libswiftSyntax † Area → compiler: the once-integrated C++ Syntax library succeeded by SwiftSyntax source tooling Area: IDE support, SourceKit, and other source tooling stale Resolution: No longer relevant, stale types Feature: types unexpected error Bug: Unexpected error

Comments

@dan-zheng
Copy link
Collaborator

dan-zheng commented Nov 21, 2018

Previous ID SR-9316
Radar None
Original Reporter @dan-zheng
Type Bug
Environment

Swift built from this commit: ab37099

Additional Detail from JIRA
Votes 0
Component/s Source Tooling
Labels Bug, Syntax
Assignee None
Priority Medium

md5: 34a2083c388b96b7ef7fc883dadbf305

Issue Description:

Simple reproducer:

// convention.swift
// This passes syntax verification.
let f: @convention(c) (Int) -> Int = { x in x }

func foo<T>(_ x: T.Type) {}
// This does not.
foo((@convention(c) (Int) -> Int).self)
$ swiftc -Xfrontend -verify-syntax-tree convention.swift
convention.swift:6:6: error: unknown expression syntax exists in the source
foo((@convention(c) (Int) -> Int).self)
     ^
@dan-zheng
Copy link
Collaborator Author

This bug blocks the following PR: #20674

@belkadan
Copy link
Contributor

cc @rintaro

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added source tooling Area: IDE support, SourceKit, and other source tooling attributes Feature: Declaration and type attributes unexpected error Bug: Unexpected error function types Feature → types: function types @convention Feature → attributes: the @convention attribute types Feature: types labels Apr 5, 2023
@AnthonyLatsis
Copy link
Collaborator

libSyntax was removed in #62145 and succeeded by swift-syntax.

@AnthonyLatsis AnthonyLatsis closed this as not planned Won't fix, can't repro, duplicate, stale Apr 5, 2023
@AnthonyLatsis AnthonyLatsis added the stale Resolution: No longer relevant, stale label Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
attributes Feature: Declaration and type attributes bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. @convention Feature → attributes: the @convention attribute function types Feature → types: function types † libswiftSyntax † Area → compiler: the once-integrated C++ Syntax library succeeded by SwiftSyntax source tooling Area: IDE support, SourceKit, and other source tooling stale Resolution: No longer relevant, stale types Feature: types unexpected error Bug: Unexpected error
Projects
None yet
Development

No branches or pull requests

3 participants