Skip to content

[MiscDiagnostics] Downgrade plain type use error to a warning for certain positions #38291

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

Merged
merged 2 commits into from
Jul 8, 2021

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jul 7, 2021

In Swift < 6 warn about plain type name passed as an
argument to a subscript, dynamic subscript, or ObjC
literal since it used to be accepted.

Resolves: rdar://80270126

@xedin xedin requested a review from hborla July 7, 2021 20:56
Copy link
Member

@hborla hborla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Small nit: you can use .limitBehavior and use value_of_metatype_type directly instead of declaring a new warning version of it, but I'm going to change this in a follow-up PR anyway after adding a helper for .warnUntilSwift6

@xedin xedin force-pushed the rdar-61749633-warning branch from b158ccb to e738b35 Compare July 7, 2021 21:34
…tain positions

In Swift < 6 warn about plain type name passed as an
argument to a subscript, dynamic subscript, or ObjC
literal since it used to be accepted.

Resolves: rdar://80270126
@xedin
Copy link
Contributor Author

xedin commented Jul 7, 2021

@swift-ci please smoke test

@xedin xedin merged commit fca6072 into swiftlang:main Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants