Skip to content

Error using type abbreviation for attribute #7877

@Happypig375

Description

@Happypig375

Repro steps

Microsoft (R) F# Interactive version 10.6.0.0 for F# 4.7
Copyright (c) Microsoft Corporation. All Rights Reserved.

For help type #help;;

> type A<'T>() = inherit System.Attribute()
type B = A<string>
[<B>] type C = class end;;


error FS0193: internal error: The lists had different lengths.
list2 is 1 element shorter than list1

Parameter name: list2

> 

Expected behavior

One of:

  • Compiles to a type with a generic attribute.
  • Gives an accurate error about generic attributes not being supported.

Actual behavior

error FS0193: internal error: The lists had different lengths.
list2 is 1 element shorter than list1

Related information

Provide any related information (optional):

  • Operating system: Windows 10
  • .NET Runtime kind (.NET Core, .NET Framework, Mono): .NET Framework 4.8
  • Editing Tools (e.g. Visual Studio Version, Visual Studio): VS16.3.9

Metadata

Metadata

Assignees

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