-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Filter out classes with private members from the contextual types for object literal nodes #56183
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
Open
Andarist
wants to merge
8
commits into
microsoft:main
Choose a base branch
from
Andarist:filter-out-classes-with-private-members-for-contextual-type
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
cb560f0
Filter out classes with private members from the contextual types for…
Andarist dcff0c7
Rename the helper function and reorder some declarations
Andarist 34d43f0
Merge remote-tracking branch 'origin/main' into filter-out-classes-wi…
Andarist 646b05f
Merge remote-tracking branch 'origin/main' into filter-out-classes-wi…
Andarist 1601a22
add extra test cases
Andarist 7c9a2fe
just reassign a parameter
Andarist a2721ff
Merge remote-tracking branch 'origin/main' into filter-out-classes-wi…
Andarist b9d16a0
move the fix
Andarist File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...s/reference/contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.errors.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts(18,8): error TS2345: Argument of type '{ doStuff: (arg: (arg: string) => void) => void; }' is not assignable to parameter of type 'Foo'. | ||
| Property '#foo' is missing in type '{ doStuff: (arg: (arg: string) => void) => void; }' but required in type 'Foo'. | ||
|
|
||
|
|
||
| ==== contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts (1 errors) ==== | ||
| class Foo { | ||
| #foo = "foo"; | ||
| doStuff(cb: (arg: string) => void) {} | ||
| } | ||
|
|
||
| interface FooLike { | ||
| doStuff: (cb: (arg: number) => void) => void; | ||
| } | ||
|
|
||
| declare function useIt(arg: Foo | FooLike): void; | ||
|
|
||
| useIt({ | ||
| doStuff: (arg) => {}, | ||
| }); | ||
|
|
||
| declare function useIt2(arg: Foo): void; | ||
|
|
||
| useIt2({ | ||
| ~ | ||
| doStuff: (arg) => {}, | ||
| ~~~~~~~~~~~~~~~~~~~~~~~ | ||
| }); | ||
| ~ | ||
| !!! error TS2345: Argument of type '{ doStuff: (arg: (arg: string) => void) => void; }' is not assignable to parameter of type 'Foo'. | ||
| !!! error TS2345: Property '#foo' is missing in type '{ doStuff: (arg: (arg: string) => void) => void; }' but required in type 'Foo'. | ||
| !!! related TS2728 contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts:2:3: '#foo' is declared here. | ||
|
|
||
| declare function useIt3(arg: FooLike): void; | ||
|
|
||
| useIt3({ | ||
| doStuff: (arg) => {}, | ||
| }); | ||
|
|
67 changes: 67 additions & 0 deletions
67
...ines/reference/contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.symbols
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| //// [tests/cases/compiler/contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts] //// | ||
|
|
||
| === contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts === | ||
| class Foo { | ||
| >Foo : Symbol(Foo, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 0, 0)) | ||
|
|
||
| #foo = "foo"; | ||
| >#foo : Symbol(Foo.#foo, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 0, 11)) | ||
|
|
||
| doStuff(cb: (arg: string) => void) {} | ||
| >doStuff : Symbol(Foo.doStuff, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 1, 15)) | ||
| >cb : Symbol(cb, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 2, 10)) | ||
| >arg : Symbol(arg, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 2, 15)) | ||
| } | ||
|
|
||
| interface FooLike { | ||
| >FooLike : Symbol(FooLike, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 3, 1)) | ||
|
|
||
| doStuff: (cb: (arg: number) => void) => void; | ||
| >doStuff : Symbol(FooLike.doStuff, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 5, 19)) | ||
| >cb : Symbol(cb, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 6, 12)) | ||
| >arg : Symbol(arg, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 6, 17)) | ||
| } | ||
|
|
||
| declare function useIt(arg: Foo | FooLike): void; | ||
| >useIt : Symbol(useIt, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 7, 1)) | ||
| >arg : Symbol(arg, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 9, 23)) | ||
| >Foo : Symbol(Foo, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 0, 0)) | ||
| >FooLike : Symbol(FooLike, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 3, 1)) | ||
|
|
||
| useIt({ | ||
| >useIt : Symbol(useIt, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 7, 1)) | ||
|
|
||
| doStuff: (arg) => {}, | ||
| >doStuff : Symbol(doStuff, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 11, 7)) | ||
| >arg : Symbol(arg, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 12, 12)) | ||
|
|
||
| }); | ||
|
|
||
| declare function useIt2(arg: Foo): void; | ||
| >useIt2 : Symbol(useIt2, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 13, 3)) | ||
| >arg : Symbol(arg, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 15, 24)) | ||
| >Foo : Symbol(Foo, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 0, 0)) | ||
|
|
||
| useIt2({ | ||
| >useIt2 : Symbol(useIt2, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 13, 3)) | ||
|
|
||
| doStuff: (arg) => {}, | ||
| >doStuff : Symbol(doStuff, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 17, 8)) | ||
| >arg : Symbol(arg, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 18, 12)) | ||
|
|
||
| }); | ||
|
|
||
| declare function useIt3(arg: FooLike): void; | ||
| >useIt3 : Symbol(useIt3, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 19, 3)) | ||
| >arg : Symbol(arg, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 21, 24)) | ||
| >FooLike : Symbol(FooLike, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 3, 1)) | ||
|
|
||
| useIt3({ | ||
| >useIt3 : Symbol(useIt3, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 19, 3)) | ||
|
|
||
| doStuff: (arg) => {}, | ||
| >doStuff : Symbol(doStuff, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 23, 8)) | ||
| >arg : Symbol(arg, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts, 24, 12)) | ||
|
|
||
| }); | ||
|
|
104 changes: 104 additions & 0 deletions
104
...elines/reference/contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| //// [tests/cases/compiler/contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts] //// | ||
|
|
||
| === contextuallyTypedParametersPositionIncludesClassWithPrivateMember1.ts === | ||
| class Foo { | ||
| >Foo : Foo | ||
| > : ^^^ | ||
|
|
||
| #foo = "foo"; | ||
| >#foo : string | ||
| > : ^^^^^^ | ||
| >"foo" : "foo" | ||
| > : ^^^^^ | ||
|
|
||
| doStuff(cb: (arg: string) => void) {} | ||
| >doStuff : (cb: (arg: string) => void) => void | ||
| > : ^ ^^ ^^^^^^^^^ | ||
| >cb : (arg: string) => void | ||
| > : ^ ^^ ^^^^^ | ||
| >arg : string | ||
| > : ^^^^^^ | ||
| } | ||
|
|
||
| interface FooLike { | ||
| doStuff: (cb: (arg: number) => void) => void; | ||
| >doStuff : (cb: (arg: number) => void) => void | ||
| > : ^ ^^ ^^^^^ | ||
| >cb : (arg: number) => void | ||
| > : ^ ^^ ^^^^^ | ||
| >arg : number | ||
| > : ^^^^^^ | ||
| } | ||
|
|
||
| declare function useIt(arg: Foo | FooLike): void; | ||
| >useIt : (arg: Foo | FooLike) => void | ||
| > : ^ ^^ ^^^^^ | ||
| >arg : Foo | FooLike | ||
| > : ^^^^^^^^^^^^^ | ||
|
|
||
| useIt({ | ||
| >useIt({ doStuff: (arg) => {},}) : void | ||
| > : ^^^^ | ||
| >useIt : (arg: Foo | FooLike) => void | ||
| > : ^ ^^ ^^^^^ | ||
| >{ doStuff: (arg) => {},} : { doStuff: (arg: (arg: number) => void) => void; } | ||
| > : ^^^^^^^^^^^^ ^^^ ^^ ^^^^^ ^^^^^^^^^^^^ | ||
|
|
||
| doStuff: (arg) => {}, | ||
| >doStuff : (arg: (arg: number) => void) => void | ||
| > : ^ ^^^ ^^ ^^^^^ ^^^^^^^^^ | ||
| >(arg) => {} : (arg: (arg: number) => void) => void | ||
| > : ^ ^^^ ^^ ^^^^^ ^^^^^^^^^ | ||
| >arg : (arg: number) => void | ||
| > : ^ ^^ ^^^^^ | ||
|
|
||
| }); | ||
|
|
||
| declare function useIt2(arg: Foo): void; | ||
| >useIt2 : (arg: Foo) => void | ||
| > : ^ ^^ ^^^^^ | ||
| >arg : Foo | ||
| > : ^^^ | ||
|
|
||
| useIt2({ | ||
| >useIt2({ doStuff: (arg) => {},}) : void | ||
| > : ^^^^ | ||
| >useIt2 : (arg: Foo) => void | ||
| > : ^ ^^ ^^^^^ | ||
| >{ doStuff: (arg) => {},} : { doStuff: (arg: (arg: string) => void) => void; } | ||
| > : ^^^^^^^^^^^^ ^^^ ^^ ^^^^^ ^^^^^^^^^^^^ | ||
|
|
||
| doStuff: (arg) => {}, | ||
| >doStuff : (arg: (arg: string) => void) => void | ||
| > : ^ ^^^ ^^ ^^^^^ ^^^^^^^^^ | ||
| >(arg) => {} : (arg: (arg: string) => void) => void | ||
| > : ^ ^^^ ^^ ^^^^^ ^^^^^^^^^ | ||
| >arg : (arg: string) => void | ||
| > : ^ ^^ ^^^^^ | ||
|
|
||
| }); | ||
|
|
||
| declare function useIt3(arg: FooLike): void; | ||
| >useIt3 : (arg: FooLike) => void | ||
| > : ^ ^^ ^^^^^ | ||
| >arg : FooLike | ||
| > : ^^^^^^^ | ||
|
|
||
| useIt3({ | ||
| >useIt3({ doStuff: (arg) => {},}) : void | ||
| > : ^^^^ | ||
| >useIt3 : (arg: FooLike) => void | ||
| > : ^ ^^ ^^^^^ | ||
| >{ doStuff: (arg) => {},} : { doStuff: (arg: (arg: number) => void) => void; } | ||
| > : ^^^^^^^^^^^^ ^^^ ^^ ^^^^^ ^^^^^^^^^^^^ | ||
|
|
||
| doStuff: (arg) => {}, | ||
| >doStuff : (arg: (arg: number) => void) => void | ||
| > : ^ ^^^ ^^ ^^^^^ ^^^^^^^^^ | ||
| >(arg) => {} : (arg: (arg: number) => void) => void | ||
| > : ^ ^^^ ^^ ^^^^^ ^^^^^^^^^ | ||
| >arg : (arg: number) => void | ||
| > : ^ ^^ ^^^^^ | ||
|
|
||
| }); | ||
|
|
38 changes: 38 additions & 0 deletions
38
...s/reference/contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.errors.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts(18,8): error TS2345: Argument of type '{ doStuff: (arg: (arg: string) => void) => void; }' is not assignable to parameter of type 'Foo'. | ||
| Property 'foo' is missing in type '{ doStuff: (arg: (arg: string) => void) => void; }' but required in type 'Foo'. | ||
|
|
||
|
|
||
| ==== contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts (1 errors) ==== | ||
| class Foo { | ||
| private foo = "foo"; | ||
| doStuff(cb: (arg: string) => void) {} | ||
| } | ||
|
|
||
| interface FooLike { | ||
| doStuff: (cb: (arg: number) => void) => void; | ||
| } | ||
|
|
||
| declare function useIt(arg: Foo | FooLike): void; | ||
|
|
||
| useIt({ | ||
| doStuff: (arg) => {}, | ||
| }); | ||
|
|
||
| declare function useIt2(arg: Foo): void; | ||
|
|
||
| useIt2({ | ||
| ~ | ||
| doStuff: (arg) => {}, | ||
| ~~~~~~~~~~~~~~~~~~~~~~~ | ||
| }); | ||
| ~ | ||
| !!! error TS2345: Argument of type '{ doStuff: (arg: (arg: string) => void) => void; }' is not assignable to parameter of type 'Foo'. | ||
| !!! error TS2345: Property 'foo' is missing in type '{ doStuff: (arg: (arg: string) => void) => void; }' but required in type 'Foo'. | ||
| !!! related TS2728 contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts:2:11: 'foo' is declared here. | ||
|
|
||
| declare function useIt3(arg: FooLike): void; | ||
|
|
||
| useIt3({ | ||
| doStuff: (arg) => {}, | ||
| }); | ||
|
|
67 changes: 67 additions & 0 deletions
67
...ines/reference/contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.symbols
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| //// [tests/cases/compiler/contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts] //// | ||
|
|
||
| === contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts === | ||
| class Foo { | ||
| >Foo : Symbol(Foo, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 0, 0)) | ||
|
|
||
| private foo = "foo"; | ||
| >foo : Symbol(Foo.foo, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 0, 11)) | ||
|
|
||
| doStuff(cb: (arg: string) => void) {} | ||
| >doStuff : Symbol(Foo.doStuff, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 1, 22)) | ||
| >cb : Symbol(cb, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 2, 10)) | ||
| >arg : Symbol(arg, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 2, 15)) | ||
| } | ||
|
|
||
| interface FooLike { | ||
| >FooLike : Symbol(FooLike, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 3, 1)) | ||
|
|
||
| doStuff: (cb: (arg: number) => void) => void; | ||
| >doStuff : Symbol(FooLike.doStuff, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 5, 19)) | ||
| >cb : Symbol(cb, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 6, 12)) | ||
| >arg : Symbol(arg, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 6, 17)) | ||
| } | ||
|
|
||
| declare function useIt(arg: Foo | FooLike): void; | ||
| >useIt : Symbol(useIt, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 7, 1)) | ||
| >arg : Symbol(arg, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 9, 23)) | ||
| >Foo : Symbol(Foo, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 0, 0)) | ||
| >FooLike : Symbol(FooLike, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 3, 1)) | ||
|
|
||
| useIt({ | ||
| >useIt : Symbol(useIt, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 7, 1)) | ||
|
|
||
| doStuff: (arg) => {}, | ||
| >doStuff : Symbol(doStuff, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 11, 7)) | ||
| >arg : Symbol(arg, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 12, 12)) | ||
|
|
||
| }); | ||
|
|
||
| declare function useIt2(arg: Foo): void; | ||
| >useIt2 : Symbol(useIt2, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 13, 3)) | ||
| >arg : Symbol(arg, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 15, 24)) | ||
| >Foo : Symbol(Foo, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 0, 0)) | ||
|
|
||
| useIt2({ | ||
| >useIt2 : Symbol(useIt2, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 13, 3)) | ||
|
|
||
| doStuff: (arg) => {}, | ||
| >doStuff : Symbol(doStuff, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 17, 8)) | ||
| >arg : Symbol(arg, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 18, 12)) | ||
|
|
||
| }); | ||
|
|
||
| declare function useIt3(arg: FooLike): void; | ||
| >useIt3 : Symbol(useIt3, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 19, 3)) | ||
| >arg : Symbol(arg, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 21, 24)) | ||
| >FooLike : Symbol(FooLike, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 3, 1)) | ||
|
|
||
| useIt3({ | ||
| >useIt3 : Symbol(useIt3, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 19, 3)) | ||
|
|
||
| doStuff: (arg) => {}, | ||
| >doStuff : Symbol(doStuff, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 23, 8)) | ||
| >arg : Symbol(arg, Decl(contextuallyTypedParametersPositionIncludesClassWithPrivateMember2.ts, 24, 12)) | ||
|
|
||
| }); | ||
|
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
likely this alone (or something close to it) would fix the completion problem (
private foois already filtered out from completions, only#foois not) but that wouldn't fix thecontextuallyTypedParametersPositionIncludesClassWithPrivateMembertest cases