Skip to content

Java: Adjust ClassInstanceExpr type argument predicates docs #14401

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

Conversation

Marcono1234
Copy link
Contributor

The type arguments which these predicates have as result are for the type of the created instance.

Previously the documentation said "provided to the constructor", which is misleading / incorrect. Type arguments provided to the constructor are specified directly after the new keyword:

class C {
    <T> C() {
    }
}

new <String> C();

And those are not part of the results of these predicates.

Feedback, especially regarding the wording, is welcome!

The type arguments which these predicates have as result are for the
type of the created instance.

Previously the documentation said "provided to the constructor", which
is misleading / incorrect. Type arguments provided to the constructor
are specified directly after the `new` keyword:
```
class C {
    <T> C() {
    }
}

new <String> C();
```

And those are not part of the results of these predicates.
@Marcono1234 Marcono1234 requested a review from a team as a code owner October 7, 2023 01:46
@github-actions github-actions bot added the Java label Oct 7, 2023
@aschackmull aschackmull added the no-change-note-required This PR does not need a change note label Oct 9, 2023
Copy link
Contributor

@aschackmull aschackmull left a comment

Choose a reason for hiding this comment

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

SGTM

@aschackmull aschackmull merged commit 8c6a1be into github:main Oct 9, 2023
@Marcono1234 Marcono1234 deleted the marcono1234/ClassInstanceExpr-type-argument-doc branch October 9, 2023 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Java no-change-note-required This PR does not need a change note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants