Skip to content

Use the use_dynamic option to determine whether to dynamically resolve #2007

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 1 commit into from
Oct 21, 2020

Conversation

adrian-prantl
Copy link

self in Swift expressions.

This is a more principled approach over always dynamically resolving
all types and fixes a regression hidden by the recent @swifttest
decorator bug.

@adrian-prantl
Copy link
Author

@swift-ci test

@@ -14,7 +14,7 @@ func apply<Type>(_ T : Type, fn: (Type) -> Type) -> Type { return fn(T) }
public func f<Type>(_ value : Type)
{
apply(value) { arg in
return arg //% self.expect('po arg', substrs=['3735928559'])
return arg //% self.expect('expr -o -d run TestSwiftGenericStructDebugInfoGenericApply.py -- arg', substrs=['3735928559'])

Choose a reason for hiding this comment

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

Not sure if I understand this. I would say this is a typo but apparently it's passing?

PASS: lldb-api :: lang/swift/variables/generic_struct_debug_info/generic_apply/TestSwiftGenericStructDebugInfoGenericApply.py (222 of 345)

Choose a reason for hiding this comment

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

It actually seems expr just ignores this stuff.

Copy link
Author

Choose a reason for hiding this comment

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

Wow.

Copy link
Author

Choose a reason for hiding this comment

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

I think this is an artifact of how arguments are parsed (and how I copied &pasted)

@adrian-prantl
Copy link
Author

@swift-ci test

self in Swift expressions.

This is a more principled approach over always dynamically resolving
all types and fixes a regression hidden by the recent @swifttest
decorator bug.
@adrian-prantl
Copy link
Author

@swift-ci test

@Teemperor Teemperor self-requested a review October 21, 2020 20:59
Copy link

@Teemperor Teemperor left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for fixing this! IOU

@adrian-prantl adrian-prantl merged commit c6d7adb into swiftlang:swift/main Oct 21, 2020
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