Skip to content
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

Merge main to main-vs-deps #54157

Merged
186 commits merged into from
Jun 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
186 commits
Select commit Hold shift + click to select a range
84f5f39
Working UI and some functions
ryzngard Mar 11, 2021
4345242
Add unit tests
ryzngard Mar 12, 2021
fd9b756
Merge pull request #51899 from dotnet/main
ryzngard Mar 16, 2021
1727f28
Working UI and some functions
ryzngard Mar 11, 2021
a9b6e07
Add unit tests
ryzngard Mar 12, 2021
03999cc
Remove package changes
ryzngard Mar 12, 2021
085e7c3
WIP
ryzngard Mar 15, 2021
7920278
Add more tests
ryzngard Mar 16, 2021
2906847
Undo unneeded changes
ryzngard Mar 16, 2021
1dd8dc3
Add comments to test. Make abstract base for tests in prep for VB
ryzngard Mar 16, 2021
465dc80
Fix test accessibility modifier
ryzngard Mar 16, 2021
ec0ca3c
WIP
ryzngard Mar 16, 2021
87c0fa6
Update tests to use line base. Use SymbolFinder
ryzngard Mar 16, 2021
ef3c027
Use ProgressTracking for SymbolFinder
ryzngard Mar 16, 2021
53fb6b2
Merge branch 'feature/value_tracking/initial' into feature/value_trac…
ryzngard Mar 16, 2021
7df622b
Update UI
ryzngard Mar 19, 2021
86ba825
Fix correctness build
ryzngard Mar 19, 2021
cdfb8dc
PR feedback
ryzngard Mar 19, 2021
307e7c6
Merge pull request #51898 from ryzngard/feature/value_tracking/service
Mar 19, 2021
b46e4de
Merge remote-tracking branch 'upstream/features/value_tracking' into …
ryzngard Mar 19, 2021
c136795
Make async instead of blocking UI
ryzngard Mar 19, 2021
56b0901
Undo csproj changes
ryzngard Mar 19, 2021
d7fcd43
Fix formatting
ryzngard Mar 19, 2021
e4455e0
Merge pull request #51974 from ryzngard/feature/value_tracking/ui
Mar 19, 2021
adb3873
Update interface to take in textspan
ryzngard Mar 20, 2021
4d93147
More tests, now covering across method calls
ryzngard Mar 24, 2021
dfda2ef
More methods handled correctly
ryzngard Mar 25, 2021
326f950
Fixed arguments for invocation expressions
ryzngard Mar 25, 2021
b610de2
Merge pull request #52179 from dotnet/MainSnapshot
Mar 27, 2021
e28fc84
Update src/EditorFeatures/Core/ValueTracking/ValueTrackingService.cs
ryzngard Mar 29, 2021
e4ed2b1
Correctness fixes
ryzngard Mar 30, 2021
7b1fabf
Merge branch 'feature/value_tracking/handle_single_expression' of htt…
ryzngard Mar 30, 2021
ca1e841
Merge pull request #52127 from ryzngard/feature/value_tracking/handle…
Mar 30, 2021
f66f4c1
Move to visitor pattern for operations to make it easier to follow
ryzngard Mar 31, 2021
482a735
Add better support for out params
ryzngard Apr 1, 2021
2298346
Fix tests
ryzngard Apr 2, 2021
cec3a6c
>.>
ryzngard Apr 2, 2021
ff59bc0
Allow `abstract` and `sealed` modifiers on static methods/properties/…
AlekseyTs Apr 2, 2021
409d2f2
Implement several aspects of "Static Abstract Members In Interfaces" …
AlekseyTs Apr 2, 2021
0d08f94
PR feedback
ryzngard Apr 3, 2021
1cabca7
Fix formatting and messages
ryzngard Apr 3, 2021
993bae4
Update commenting on ShouldTrackArgument
ryzngard Apr 6, 2021
622ad1a
Move VisitChildrenAsync to VisitDefaultAsync to avoid an allowlist st…
ryzngard Apr 6, 2021
4797c22
Use Equals instead of == when comparing symbols
ryzngard Apr 6, 2021
6de0d32
Update UI to navigate to items on selection
ryzngard Apr 6, 2021
efe8207
Merge pull request #52361 from ryzngard/feature/value_tracking/expres…
ryzngard Apr 6, 2021
0f8688b
Highlight relative spans in TreeViewItems
ryzngard Apr 7, 2021
056f7ca
Merge branch 'main' into features/value_tracking
ryzngard Apr 7, 2021
95c3418
Add cancellationToken argument to GetOperation
ryzngard Apr 7, 2021
cb81890
Use resource for tool window name
ryzngard Apr 7, 2021
f6e6000
Merge branch 'features/value_tracking' into feature/value_tracking/ui…
ryzngard Apr 7, 2021
a118e09
Merge pull request #52461 from ryzngard/features/value_tracking
ryzngard Apr 7, 2021
e2b55fe
Merge branch 'features/value_tracking' into feature/value_tracking/ui…
ryzngard Apr 7, 2021
8334ce4
Merge branch 'feature/value_tracking/ui_improvements' of https://gith…
ryzngard Apr 7, 2021
d8dd143
Apply suggestions from code review
ryzngard Apr 7, 2021
82efcbe
Update src/VisualStudio/Core/Def/ValueTracking/ValueTrackingCommandHa…
ryzngard Apr 8, 2021
32c02af
PR feedback
ryzngard Apr 8, 2021
60224a1
Merge pull request #52553 from dotnet/merges/main-to-features/value_t…
Apr 11, 2021
b72d137
Bold and truncate strings
ryzngard Apr 12, 2021
51dc1c9
Revert "Bold and truncate strings"
ryzngard Apr 13, 2021
e9fefa0
Add a details pane
ryzngard Apr 13, 2021
174ccd8
Handle parameterless initialization of tool window
ryzngard Apr 13, 2021
dfd040f
Fix resize behavior of the grid
ryzngard Apr 13, 2021
55cd3fe
Correctness change
ryzngard Apr 14, 2021
ff1d1bd
Merge pull request #52466 from ryzngard/feature/value_tracking/ui_imp…
ryzngard Apr 14, 2021
e111a83
Enable basic scenarios of consuming abstract static members on type p…
AlekseyTs Apr 15, 2021
ec2454d
Merge 'dotnet/main' into `StaticAbstractMembersInInterfaces`
AlekseyTs Apr 15, 2021
bf55a14
Merge pull request #52657 from AlekseyTs/StaticAbstractMembersInInter…
AlekseyTs Apr 15, 2021
48e3c46
Implement lang version check for basic consumption scenarios of abstr…
AlekseyTs Apr 16, 2021
af56306
Merge remote-tracking branch 'upstream/main' into merges/main-to-feat…
ryzngard Apr 19, 2021
b8d8a2c
Update to new IStreamingFindReferencesProgress
ryzngard Apr 19, 2021
18cd442
Support delegate or function pointer creation based on a static abstr…
AlekseyTs Apr 20, 2021
5030478
Correctness fixes
ryzngard Apr 20, 2021
d5785de
Merge pull request #52713 from dotnet/merges/main-to-features/value_t…
Apr 20, 2021
834951e
Track variable declarations as well as assignments
ryzngard Apr 22, 2021
0bfe244
Remove extra ;
ryzngard Apr 23, 2021
968d2d6
Merge pull request #52902 from dotnet/merges/main-to-features/value_t…
Apr 25, 2021
2de7aa4
Add support for implementations of interface static abstract methods …
AlekseyTs Apr 30, 2021
91894b4
Merge 'main' into 'features/StaticAbstractMembersInInterfaces'
AlekseyTs Apr 30, 2021
c72db2e
Merge 'main' into 'features/StaticAbstractMembersInInterfaces'
AlekseyTs Apr 30, 2021
c6e79d6
Update based on PR feedback
ryzngard May 3, 2021
3a42e1a
Add multiple declarator tests
ryzngard May 3, 2021
de19e26
Introduce a common base type for SourceOrdinaryMethodSymbolBase and S…
AlekseyTs May 3, 2021
8e78625
Merge pull request #52846 from ryzngard/features/value_tracking
ryzngard May 3, 2021
06322f7
Support syntax for explicit implementation of operators (#53038)
AlekseyTs May 4, 2021
25f68d9
Merge pull request #53086 from dotnet/merges/main-to-features/value_t…
May 4, 2021
3c043e4
Add logging to Value Tracking
ryzngard May 4, 2021
9514454
Merge remote-tracking branch 'upstream/features/value_tracking' into …
ryzngard May 4, 2021
91d6ebf
Implmenet new IStreamingFindReferencesProgress
ryzngard May 4, 2021
ce69e1f
Improve error recovery in parser around explicit interface specifier …
AlekseyTs May 4, 2021
18007c6
Update proposal URL in StaticAbstractMembersInInterfaces.md (#53146)
RikkiGibson May 4, 2021
3de2785
Correctness fix
ryzngard May 5, 2021
a027ae1
Add telemetry to Value Tracking
ryzngard May 5, 2021
dd2e7be
Add progress bar to the top of value tracking
ryzngard May 6, 2021
e758184
Add support for implementations of interface static abstract operator…
AlekseyTs May 6, 2021
5a0ac29
Update to "Computing..." with spinner
ryzngard May 7, 2021
983394a
Move to static ValueTracker to prepare for OOP code
ryzngard May 7, 2021
dba049d
Merge remote-tracking branch 'upstream/features/value_tracking' into …
ryzngard May 10, 2021
714368f
Rename to TreeItemViewModel
ryzngard May 10, 2021
3e9ce12
Merge 'main' into 'StaticAbstractMembersInInterfaces'
AlekseyTs May 10, 2021
0d519f9
Follow-up on merge
AlekseyTs May 10, 2021
9687c3d
Merge 'main' into 'StaticAbstractMembersInInterfaces'
AlekseyTs May 10, 2021
84acaf5
Add support for implementations of interface static abstract properti…
AlekseyTs May 11, 2021
5783ab1
Add RemoteValueTrackingService
ryzngard May 7, 2021
c38c32f
Use remote client when possible. Remove dependency on ISymbol in UI
ryzngard May 10, 2021
1cffffa
Move ValueTracking to Features instead of EditorFeatures
ryzngard May 11, 2021
e478a73
Fix serialization. Move back to SourceText for now because Inlines ne…
ryzngard May 12, 2021
7d97796
Add service descriptor in resx. Update tests to help with diagnosing …
ryzngard May 12, 2021
684f523
Add support for abstract `==`/`!=` operators in interfaces. (#53393)
AlekseyTs May 14, 2021
ba1ec64
Correctness fixes
ryzngard May 14, 2021
9a4d609
Actually return builder stuff...
ryzngard May 18, 2021
384af13
Enable declaration of conversion operators in interfaces. (#53434)
AlekseyTs May 19, 2021
e6a895a
Add remote to unit tests
ryzngard May 19, 2021
847f9c6
Support syntax for explicit implementation of conversion operators (#…
AlekseyTs May 19, 2021
2ab7887
Merge pull request #53206 from ryzngard/features/value_tracking_progr…
ryzngard May 19, 2021
e3c7c5c
Merge remote-tracking branch 'dotnet/main' into StaticAbstractMembers…
AlekseyTs May 20, 2021
5b7c15d
Merge branch 'features/value_tracking' into features/value_tracking_oop
ryzngard May 20, 2021
6634900
Merge remote-tracking branch 'dotnet/main' into StaticAbstractMembers…
AlekseyTs May 20, 2021
6289b6a
Merge 'main' into 'StaticAbstractMembersInInterfaces'
AlekseyTs May 20, 2021
eab3d80
Post merge fixups
ryzngard May 20, 2021
766afd9
Add support for implementations of interface static abstract user-def…
AlekseyTs May 21, 2021
07c3c6a
multiple blank lines are the bane of my existance
ryzngard May 21, 2021
f44f5ff
Merge branch 'main' into features/value_tracking
ryzngard May 26, 2021
b32c7c4
Merge pull request #53702 from ryzngard/features/value_tracking
ryzngard May 26, 2021
cb67f02
Merge branch 'features/value_tracking' into features/value_tracking_oop
ryzngard May 26, 2021
4264c04
Enable consumption of user-defined conversion operators declared in i…
AlekseyTs May 27, 2021
fb58422
Merge branch 'main' into features/value_tracking_oop
ryzngard May 27, 2021
9d53dcb
Merge 'main' into StaticAbstractMembersInInterfaces
AlekseyTs Jun 1, 2021
2be860b
Merge 'main' into StaticAbstractMembersInInterfaces
AlekseyTs Jun 1, 2021
838b962
Merge pull request #53270 from ryzngard/features/value_tracking_oop
ryzngard Jun 1, 2021
56c6b4b
Remove PROTOTYPE comments StaticAbstractMembersInInterfaces feature b…
AlekseyTs Jun 3, 2021
9269a8c
Merge pull request #53778 from dotnet/merges/main-to-features/value_t…
Jun 3, 2021
17246fb
Merge pull request #53904 from dotnet/merges/main-to-features/value_t…
Jun 6, 2021
87045f2
Add enum value
Cosifne Jun 8, 2021
aa0fda6
Add new helpers in language service
Cosifne Jun 8, 2021
3dc7387
Properly resolve method references in constructed generic types. (#53…
AlekseyTs Jun 8, 2021
c07b058
Strengthen some unit-tests (#53949)
AlekseyTs Jun 8, 2021
62b550b
Reference the new helpers
Cosifne Jun 8, 2021
72057b9
Add relevant checks for tuple comparison. (#53871)
AlekseyTs Jun 8, 2021
9897ce8
Make view model side change
Cosifne Jun 8, 2021
82c2939
Code clean up
Cosifne Jun 9, 2021
7d5c6ab
Fix InheritanceMargin test
Cosifne Jun 9, 2021
2946295
Fix view model test
Cosifne Jun 9, 2021
44f2ede
Clean code
Cosifne Jun 9, 2021
dd81e39
Code clean up
Cosifne Jun 9, 2021
67d13d1
Add static modifier when implementing static interface member (#53939)
Youssef1313 Jun 10, 2021
d001c5d
Adjust `static`, `abstract`, `sealed` keyword recommenders for member…
AlekseyTs Jun 10, 2021
af38b77
Include ExplicitInterfaceImplementation
Cosifne Jun 10, 2021
bdd3d32
Fix formatting
Cosifne Jun 10, 2021
a38ded1
Put escapse logic into helpers
Cosifne Jun 10, 2021
2fcedd9
Use CDATA
Cosifne Jun 10, 2021
76672b5
Add the fix in InheritanceMargin code
Cosifne Jun 10, 2021
ea7291b
Add a test
Cosifne Jun 10, 2021
1193c1d
Fix static operator for find base/find implementation
Cosifne Jun 11, 2021
cc5b7c1
Enable completion of implicit/explicit keywords in interfaces (#54011)
AlekseyTs Jun 11, 2021
40622e3
Fix FAR for method
Cosifne Jun 11, 2021
551c8ad
Add event tests and property tests
Cosifne Jun 11, 2021
940665a
Let operator also try finding up/down via the inheritance chain
Cosifne Jun 12, 2021
9f8f76c
Fix implicit conversion
Cosifne Jun 12, 2021
a37bda5
Add operator tests
Cosifne Jun 12, 2021
5e17854
Complete InheritanceMargin Test
Cosifne Jun 12, 2021
8924bcb
Resolve comments
Cosifne Jun 15, 2021
1dbb6b2
Merge branch 'main' into dev/shech/InheritanceMarginTitleFix
Cosifne Jun 15, 2021
4fcb2bd
Merge 'main' into 'StaticAbstractMembersInInterfaces'
AlekseyTs Jun 15, 2021
4620bdd
Pack error codes.
AlekseyTs Jun 15, 2021
e16ad8f
Address feedback
Cosifne Jun 15, 2021
0e720ce
Mark "record structs" and "global usings" as done (#54093)
jcouv Jun 15, 2021
0a7a90c
Merge pull request #54056 from Cosifne/dev/shech/StaticAbstractMember…
Cosifne Jun 15, 2021
dfd8185
Add Quick Info tests for static abstract inheritdoc
sharwell Jun 15, 2021
f83b1a1
Merge branch 'main' into StaticAbstractMembersInInterfaces_29
Cosifne Jun 15, 2021
e333852
Merge branch 'features/StaticAbstractMembersInInterfaces' into Static…
Cosifne Jun 15, 2021
2f3253e
Disallow UnmanagedCallersOnly for abstract static methods.
AlekseyTs Jun 15, 2021
3874494
Merge pull request #54114 from sharwell/static-inheritdoc
sharwell Jun 15, 2021
0bf2b0c
Merge 'main' into 'StaticAbstractMembersInInterfaces'
AlekseyTs Jun 15, 2021
e2d605e
'with' on anonymous type needs to lower values (#54086)
jcouv Jun 15, 2021
6b93b0c
Use new formatting options in roslyn itself. (#53957)
CyrusNajmabadi Jun 15, 2021
bac57ff
Merge pull request #53964 from Cosifne/dev/shech/InheritanceMarginTit…
Cosifne Jun 15, 2021
d6fbb38
Merge remote-tracking branch 'upstream/main' into features/value_trac…
ryzngard Jun 15, 2021
3b94cc5
Merge pull request #54123 from ryzngard/features/value_tracking
JoeRobich Jun 16, 2021
fc7c990
Pack error codes. Disallow UnmanagedCallersOnly for abstract static m…
jaredpar Jun 16, 2021
9b0752c
EnC - Update CustomAttributes table instead of just always adding to …
davidwengier Jun 16, 2021
e8d70fd
Merge 'features/StaticAbstractMembersInInterfaces' into 'main'
AlekseyTs Jun 16, 2021
07e319e
Update the static abstract interface test
Cosifne Jun 16, 2021
4fb8c42
Merge pull request #54121 from dotnet/merges/release/dev16.11-to-main
genlu Jun 16, 2021
6920e1e
Merge pull request #54142 from AlekseyTs/StaticAbstractMembersInInter…
jaredpar Jun 16, 2021
248ab03
Merge branch 'main-vs-deps' into merges/main-to-main-vs-deps
JoeRobich Jun 17, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 24 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion

# Whitespace options
dotnet_style_allow_multiple_blank_lines_experimental = false
dotnet_style_allow_statement_immediately_after_block_experimental = true

# Non-private static fields are PascalCase
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields
Expand Down Expand Up @@ -182,6 +186,11 @@ csharp_indent_case_contents_when_block = true
csharp_indent_switch_labels = true
csharp_indent_labels = flush_left

# Whitespace options
csharp_style_allow_embedded_statements_on_same_line_experimental = false
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = false

# Prefer "var" everywhere
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
Expand Down Expand Up @@ -272,6 +281,21 @@ csharp_style_var_for_built_in_types = true:warning
csharp_style_var_when_type_is_apparent = true:warning
csharp_style_var_elsewhere = true:warning

# dotnet_style_allow_multiple_blank_lines_experimental
dotnet_diagnostic.IDE2000.severity = warning

# csharp_style_allow_embedded_statements_on_same_line_experimental
dotnet_diagnostic.IDE2001.severity = warning

# csharp_style_allow_blank_lines_between_consecutive_braces_experimental
dotnet_diagnostic.IDE2002.severity = warning

# dotnet_style_allow_statement_immediately_after_block_experimental
dotnet_diagnostic.IDE2003.severity = none

# csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental
dotnet_diagnostic.IDE2004.severity = warning

[src/{VisualStudio}/**/*.{cs,vb}]
# CA1822: Make member static
# Not enforced as a build 'warning' for 'VisualStudio' layer due to large number of false positives from https://github.com/dotnet/roslyn-analyzers/issues/3857 and https://github.com/dotnet/roslyn-analyzers/issues/3858
Expand Down
4 changes: 2 additions & 2 deletions docs/Language Feature Status.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ efforts behind them.

| Feature | Branch | State | Developer | Reviewer | LDM Champ |
| ------- | ------ | ----- | --------- | -------- | --------- |
| [Record structs](https://github.com/dotnet/csharplang/issues/4334) | [record-structs](https://github.com/dotnet/roslyn/tree/features/record-structs) | [In Progress](https://github.com/dotnet/roslyn/issues/51199) | [jcouv](https://github.com/jcouv) | [AlekseyTs](https://github.com/AlekseyTs), [RikkiGibson](https://github.com/RikkiGibson) | [jcouv](https://github.com/jcouv) |
| [Global Using Directive](https://github.com/dotnet/csharplang/issues/3428) | [GlobalUsingDirective](https://github.com/dotnet/roslyn/tree/features/GlobalUsingDirective) | [In Progress](https://github.com/dotnet/roslyn/issues/51307) | [AlekseyTs](https://github.com/AlekseyTs) | [333fred](https://github.com/333fred), [cston](https://github.com/cston) | [AlekseyTs](https://github.com/AlekseyTs) |
| [Record structs](https://github.com/dotnet/csharplang/issues/4334) | [record-structs](https://github.com/dotnet/roslyn/tree/features/record-structs) | [Merged into 16.11](https://github.com/dotnet/roslyn/issues/51199) | [jcouv](https://github.com/jcouv) | [AlekseyTs](https://github.com/AlekseyTs), [RikkiGibson](https://github.com/RikkiGibson) | [jcouv](https://github.com/jcouv) |
| [Global Using Directive](https://github.com/dotnet/csharplang/issues/3428) | [GlobalUsingDirective](https://github.com/dotnet/roslyn/tree/features/GlobalUsingDirective) | [Merged into 16.11](https://github.com/dotnet/roslyn/issues/51307) | [AlekseyTs](https://github.com/AlekseyTs) | [333fred](https://github.com/333fred), [cston](https://github.com/cston) | [AlekseyTs](https://github.com/AlekseyTs) |
| [Static Abstract Members In Interfaces](https://github.com/dotnet/csharplang/issues/4436) | [StaticAbstractMembersInInterfaces](https://github.com/dotnet/roslyn/tree/features/StaticAbstractMembersInInterfaces) | [In Progress](https://github.com/dotnet/roslyn/issues/52221) | [AlekseyTs](https://github.com/AlekseyTs) | [333fred](https://github.com/333fred), [RikkiGibson](https://github.com/RikkiGibson) | [MadsTorgersen](https://github.com/MadsTorgersen) |
| [File-scoped namespace](https://github.com/dotnet/csharplang/issues/137) | [FileScopedNamespaces](https://github.com/dotnet/roslyn/tree/features/FileScopedNamespaces) | [In Progress](https://github.com/dotnet/roslyn/issues/49000) | [RikkiGibson](https://github.com/RikkiGibson) | [jcouv](https://github.com/jcouv), [chsienki](https://github.com/chsienki) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) |
| [Interpolated string improvements](https://github.com/dotnet/csharplang/issues/4487) | [interpolated-string](https://github.com/dotnet/roslyn/tree/features/interpolated-string) | [In Progress](https://github.com/dotnet/roslyn/issues/51499) | [333fred](https://github.com/333fred) | [AlekseyTs](https://github.com/AlekseyTs), [chsienki](https://github.com/chsienki) | [jaredpar](https://github.com/jaredpar) |
Expand Down
14 changes: 14 additions & 0 deletions docs/features/StaticAbstractMembersInInterfaces.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Static Abstract Members In Interfaces
=====================================

An interface is allowed to specify abstract static members that implementing classes and structs are then
required to provide an explicit or implicit implementation of. The members can be accessed off of type
parameters that are constrained by the interface.

Proposal:
- https://github.com/dotnet/csharplang/issues/4436
- https://github.com/dotnet/csharplang/blob/main/proposals/static-abstracts-in-interfaces.md

Feature branch: https://github.com/dotnet/roslyn/tree/features/StaticAbstractMembersInInterfaces

Test plan: https://github.com/dotnet/roslyn/issues/52221
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<RoslynDiagnosticsNugetPackageVersion>3.3.3-beta1.21105.3</RoslynDiagnosticsNugetPackageVersion>
<MicrosoftCodeAnalysisNetAnalyzersVersion>6.0.0-preview1.21054.10</MicrosoftCodeAnalysisNetAnalyzersVersion>
<MicrosoftCodeAnalysisTestingVersion>1.0.1-beta1.20623.3</MicrosoftCodeAnalysisTestingVersion>
<CodeStyleAnalyzerVersion>3.9.0</CodeStyleAnalyzerVersion>
<CodeStyleAnalyzerVersion>3.10.0</CodeStyleAnalyzerVersion>
<VisualStudioEditorPackagesVersion>16.10.230</VisualStudioEditorPackagesVersion>
<VisualStudioEditorNewPackagesVersion>17.0.65-g6c25c21ba5</VisualStudioEditorNewPackagesVersion>
<ILAsmPackageVersion>5.0.0-alpha1.19409.1</ILAsmPackageVersion>
Expand Down
1 change: 1 addition & 0 deletions eng/targets/Services.props
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<ServiceHubService Include="Microsoft.VisualStudio.LanguageServices.SymbolSearchUpdate" ClassName="Microsoft.CodeAnalysis.Remote.RemoteSymbolSearchUpdateService+Factory" IsBrokered="true" />
<ServiceHubService Include="Microsoft.VisualStudio.LanguageServices.TodoCommentsDiscovery" ClassName="Microsoft.CodeAnalysis.Remote.RemoteTodoCommentsDiscoveryService+Factory" IsBrokered="true" />
<ServiceHubService Include="Microsoft.VisualStudio.LanguageServices.EditAndContinue" ClassName="Microsoft.CodeAnalysis.EditAndContinue.RemoteEditAndContinueService+Factory" IsBrokered="true" />
<ServiceHubService Include="Microsoft.VisualStudio.LanguageServices.ValueTracking" ClassName="Microsoft.CodeAnalysis.Remote.RemoteValueTrackingService+Factory" IsBrokered="true" />
<ServiceHubService Include="Microsoft.VisualStudio.LanguageServices.InheritanceMargin" ClassName="Microsoft.CodeAnalysis.Remote.RemoteInheritanceMarginService+Factory" IsBrokered="true" />
<ServiceHubService Include="roslynRemoteLanguageServer" ClassName="Microsoft.CodeAnalysis.Remote.RemoteLanguageServer" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/Binder/Binder.ValueChecks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ private bool CheckPropertyValueKind(SyntaxNode node, BoundExpression expr, BindV
return false;
}

CheckRuntimeSupportForSymbolAccess(node, receiver, setMethod, diagnostics);
CheckReceiverAndRuntimeSupportForSymbolAccess(node, receiver, setMethod, diagnostics);
}
}

Expand Down Expand Up @@ -1177,7 +1177,7 @@ private bool CheckPropertyValueKind(SyntaxNode node, BoundExpression expr, BindV
return false;
}

CheckRuntimeSupportForSymbolAccess(node, receiver, getMethod, diagnostics);
CheckReceiverAndRuntimeSupportForSymbolAccess(node, receiver, getMethod, diagnostics);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -448,11 +448,11 @@ private static string GetMethodName(BaseMethodDeclarationSyntax baseMethodDeclar
case SyntaxKind.DestructorDeclaration:
return WellKnownMemberNames.DestructorName;
case SyntaxKind.OperatorDeclaration:
return OperatorFacts.OperatorNameFromDeclaration((OperatorDeclarationSyntax)baseMethodDeclarationSyntax);
var operatorDeclaration = (OperatorDeclarationSyntax)baseMethodDeclarationSyntax;
return ExplicitInterfaceHelpers.GetMemberName(outerBinder, operatorDeclaration.ExplicitInterfaceSpecifier, OperatorFacts.OperatorNameFromDeclaration(operatorDeclaration));
case SyntaxKind.ConversionOperatorDeclaration:
return ((ConversionOperatorDeclarationSyntax)baseMethodDeclarationSyntax).ImplicitOrExplicitKeyword.Kind() == SyntaxKind.ImplicitKeyword
? WellKnownMemberNames.ImplicitConversionName
: WellKnownMemberNames.ExplicitConversionName;
var conversionDeclaration = (ConversionOperatorDeclarationSyntax)baseMethodDeclarationSyntax;
return ExplicitInterfaceHelpers.GetMemberName(outerBinder, conversionDeclaration.ExplicitInterfaceSpecifier, OperatorFacts.OperatorNameFromDeclaration(conversionDeclaration));
case SyntaxKind.MethodDeclaration:
MethodDeclarationSyntax methodDeclSyntax = (MethodDeclarationSyntax)baseMethodDeclarationSyntax;
return ExplicitInterfaceHelpers.GetMemberName(outerBinder, methodDeclSyntax.ExplicitInterfaceSpecifier, methodDeclSyntax.Identifier.ValueText);
Expand Down
23 changes: 22 additions & 1 deletion src/Compilers/CSharp/Portable/Binder/Binder_Conversions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ protected BoundExpression CreateConversion(

// Obsolete diagnostics for method group are reported as part of creating the method group conversion.
ReportDiagnosticsIfObsolete(diagnostics, conversion, syntax, hasBaseReceiver: false);
CheckConstraintLanguageVersionAndRuntimeSupportForConversion(syntax, conversion, diagnostics);

if (conversion.IsAnonymousFunction && source.Kind == BoundKind.UnboundLambda)
{
Expand Down Expand Up @@ -214,6 +215,25 @@ protected BoundExpression CreateConversion(
{ WasCompilerGenerated = wasCompilerGenerated };
}

internal void CheckConstraintLanguageVersionAndRuntimeSupportForConversion(SyntaxNodeOrToken syntax, Conversion conversion, BindingDiagnosticBag diagnostics)
{
if (conversion.IsUserDefined && conversion.Method is MethodSymbol method && method.IsStatic && method.IsAbstract)
{
Debug.Assert(conversion.ConstrainedToTypeOpt is TypeParameterSymbol);

if (Compilation.SourceModule != method.ContainingModule)
{
Debug.Assert(syntax.SyntaxTree is object);
CheckFeatureAvailability(syntax.SyntaxTree, MessageID.IDS_FeatureStaticAbstractMembersInInterfaces, diagnostics, syntax.GetLocation()!);

if (!Compilation.Assembly.RuntimeSupportsStaticAbstractMembersInInterfaces)
{
Error(diagnostics, ErrorCode.ERR_RuntimeDoesNotSupportStaticAbstractMembersInInterfaces, syntax);
}
}
}
}

private BoundExpression ConvertObjectCreationExpression(SyntaxNode syntax, BoundUnconvertedObjectCreationExpression node, bool isCast, TypeSymbol destination, BindingDiagnosticBag diagnostics)
{
var arguments = AnalyzedArguments.GetInstance(node.Arguments, node.ArgumentRefKindsOpt, node.ArgumentNamesOpt);
Expand Down Expand Up @@ -346,6 +366,7 @@ private BoundExpression CreateUserDefinedConversion(
bool hasErrors)
{
Debug.Assert(conversionGroup != null);
Debug.Assert(conversion.IsUserDefined);

if (!conversion.IsValid)
{
Expand Down Expand Up @@ -788,7 +809,7 @@ private bool MemberGroupFinalValidation(BoundExpression? receiverOpt, MethodSymb
{
if (!IsBadBaseAccess(node, receiverOpt, methodSymbol, diagnostics))
{
CheckRuntimeSupportForSymbolAccess(node, receiverOpt, methodSymbol, diagnostics);
CheckReceiverAndRuntimeSupportForSymbolAccess(node, receiverOpt, methodSymbol, diagnostics);
}

if (MemberGroupFinalValidationAccessibilityChecks(receiverOpt, methodSymbol, node, diagnostics, invokedAsExtensionMethod))
Expand Down
1 change: 1 addition & 0 deletions src/Compilers/CSharp/Portable/Binder/Binder_Crefs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,7 @@ private static ImmutableArray<Symbol> PerformCrefOverloadResolution(ArrayBuilder
name: null,
refKind: RefKind.None,
isInitOnly: false,
isStatic: false,
returnType: default,
refCustomModifiers: ImmutableArray<CustomModifier>.Empty,
explicitInterfaceImplementations: ImmutableArray<MethodSymbol>.Empty);
Expand Down
Loading