Intellisence ignores protected accessibility for constructor in derived classes #70235
Labels
Area-IDE
help wanted
The issue is "up for grabs" - add a comment if you are interested in working on it
Milestone
Steps to Reproduce:
Following code:
Produces compilation error since calling protected constuctor from method even in derived class is not allowed.
![image](https://private-user-images.githubusercontent.com/25454523/272642164-c08f792b-8afc-4c15-98d4-b31947c19916.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3NTMwMTgsIm5iZiI6MTczOTc1MjcxOCwicGF0aCI6Ii8yNTQ1NDUyMy8yNzI2NDIxNjQtYzA4Zjc5MmItOGFmYy00YzE1LTk4ZDQtYjMxOTQ3YzE5OTE2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE3VDAwMzgzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRmMzg2MDk2OWI5NGQzMjQzNzI2NWUyNGE3YTdiYjhlMjY5MTAyYjU0ZmQyZTdiOTI3NjJjNDNmMDg0NzAwMDImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.GFJEggTsNCAPqfbx3VSuJXFslTewR1Z6JM6bXmMdYL8)
But VS ignores this fact and during editing offers such constuctor as available one:
Expected Behavior:
Protected constuctors from derived class methods are filtered out from suggestions.
Actual Behavior:
VS suggests not compilable completion.
The text was updated successfully, but these errors were encountered: