Skip to content

Inconsistent coloring of interface inheriting IDisposable #16268

@kerams

Description

@kerams

image

The problem is here

| Item.Types (_, ty :: _), LegitTypeOccurence, m ->
let ty = stripTyEqns g ty
if isDisposableTy g amap ty then
add m SemanticClassificationType.DisposableType
else
match tryTcrefOfAppTy g ty with
| ValueSome tcref -> add m (reprToClassificationType g tcref.TypeReprInfo tcref)
| ValueNone ->
if isStructTupleTy g ty then
add m SemanticClassificationType.ValueType
elif isRefTupleTy g ty then
add m SemanticClassificationType.ReferenceType
elif isForallFunctionTy g ty then
add m SemanticClassificationType.Function
elif isTyparTy g ty then
add m SemanticClassificationType.ValueType
else
add m SemanticClassificationType.TypeDef

We check for a disposable type first.

Expected behavior

IConn in source code should be classified as an interface. Or perhaps the tooltip coloring should be changed?

Actual behavior

IConn in source code is classified as a disposable type. IConn in tooltip is classified as an interface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-LangService-ColorizationBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.

    Type

    No fields configured for Bug.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions