-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[AST] ParamDecl::isNonEphemeral() not to evaluate InterfaceTypeRequest #32553
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
[AST] ParamDecl::isNonEphemeral() not to evaluate InterfaceTypeRequest #32553
Conversation
@swift-ci Please smoke test |
Rather than adding a check for |
Seconded. The semantic versions of these entrypoints are still needed, they just need to be documented as semantic entrypoints. |
Is |
Aha, that's just closure parameters being their special weird selves. @hamishknight Is it possible to early-exit for un-annotated closure parameters? |
Ah yeah, it seems we should keep the new arrangement of the logic where we check whether the parent is an |
Okay, I will
How do you think of the assertion I added in |
Sounds good, thank you!
I'm okay with keeping for it for now, at some point I'd like to refactor away |
'-dump-parse' for the following code used to hit an assertion failure: struct MyStruct {} _ = { (val: MyStruct) in } Because 'isNonEphemeral()' on 'val' parameter unintentionally causes 'InterfaceTypeRequest::evaluate()'. Since 'isNonEphemeral()' inference based on the interface type is not possible after type checking, return 'false' unless 'hasInterfaceType()' Also: * Dump parameter list on 'EnumElementDecl' as well * Adjust the position of 'range=...' in parameter list dumping
cdf0713
to
9044aa0
Compare
@swift-ci Please smoke test |
rdar://problem/62895098
@swift-ci Please smoke test |
-dump-parse
for the following code used to hit an assertion failure:Because
isNonEphemeral()
onval
parameter unintentionally causesInterfaceTypeRequest::evaluate()
.SinceUse the presence ofisNonEphemeral()
inference based on the interface type is not possible after type checking, returnfalse
unlesshasInterfaceType()
.@_nonEphemeral
attribute in ASTDumper instead.Also:
EnumElementDecl
as wellrange=...
in dumping parameter listhttps://bugs.swift.org/browse/SR-12728 / rdar://problem/62895098