Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Protected member inaccessible #5302

@auduchinok

Description

@auduchinok
public class Base
{
    protected string Field;
}
type Inherited() =
    inherit Base()

    member x.Hey =
        let f () = x.Field
        f ()

screen shot 2018-07-07 at 01 14 10

This looks like intended behaviour, however the wording is misleading. In similar cases there's additional text about possible scope leaving.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-Compiler-CheckingType checking, attributes and all aspects of logic checkingArea-Compiler-Checking-AccessibilityVisibility checks: internal, private, protected, InternalsVisibleToBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.

    Type

    No fields configured for Bug.

    Projects

    Status
    New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions