Skip to content

Conversation

@rintaro
Copy link
Member

@rintaro rintaro commented Mar 12, 2020

When a completion happens at a call argument position, insert label: <#T##TypeName#> instead of just label: .

rdar://problem/60379654

When a completion happens at a call argument position, insert
'label: <#T##TypeName#>' instead of just 'label: '.

rdar://problem/60379654
@rintaro
Copy link
Member Author

rintaro commented Mar 12, 2020

@swift-ci Please smoke test

@rintaro rintaro requested a review from benlangmuir March 12, 2020 18:49
Arg->getPlainType(), ContextType,
Arg->isVariadic(), Arg->isInOut(),
/*isIUO=*/false, Arg->isAutoClosure());
Builder.addTypeAnnotation("Argument");
Copy link
Member Author

@rintaro rintaro Mar 12, 2020

Choose a reason for hiding this comment

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

@benlangmuir I don't feel right with this. What type do you think we should use here? Maybe Arg->getParameterType() which is the type of the parameter when referenced inside the function body?

Copy link
Contributor

Choose a reason for hiding this comment

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

What's the reason to not use the same type as the placeholder?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't really have a reason. Updated to use the same type.

Copy link
Member Author

Choose a reason for hiding this comment

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

If you really don't like this. I can make it '[#Int...#]'. But I think this is OK because this specific argument itself is Int.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree that Int is fine here.

@rintaro
Copy link
Member Author

rintaro commented Mar 12, 2020

@swift-ci Please smoke test

@rintaro rintaro force-pushed the ide-completion-callarg branch from cdfabd8 to 9225cfc Compare March 13, 2020 00:46
@rintaro
Copy link
Member Author

rintaro commented Mar 13, 2020

@swift-ci Please smoke test

@rintaro rintaro merged commit 52d3367 into swiftlang:master Mar 13, 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