Skip to content

internal error : encodeCustomAttrElemType: unrecognized custom element type #12796

@brianberns

Description

@brianberns

Repro steps

Compile this program:

open System.ComponentModel

type A =
    {
        AField : string
    }

type B =
    {
        [<DefaultValue([||] : A[])>]
        BField : A[]
    }

This construct is used, for example, by Newtonsoft Json.NET.

Expected behavior

Compiles successfully.

Actual behavior

Internal compiler error:

error FS0192 : internal error : encodeCustomAttrElemType: unrecognized custom element type

Known workarounds

None

Related information

Windows, .NET 6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    AI-thinks-issue-fixedArea-Compiler-CheckingType checking, attributes and all aspects of logic checkingArea-Compiler-Checking-AttributesAttribute targets, AllowMultiple, CompiledName, custom attribute encodingBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.

    Type

    Projects

    Status

    New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions