Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

Bad application of visibility rules on method parameter attributes? #273

@roji

Description

@roji

I'm using Jetbrains Code Annotations in a library which also uses Code Contracts. I'm annotating parameters on some public methods with [NotNull] and [CanBeNull] attributes, but the CC rewriter complains about visibility:

Member 'JetBrains.Annotations.CanBeNullAttribute.#ctor' has less visibility than the enclosing method '...'

Now, it's true that I'm trying to apply an internal attribute (e.g. [NotNull]) to a public method. But why should this be a problem for CC? Shouldn't it be perfectly fine to have an internal attribute meant purely for internal consumption on a public method's parameters?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions