Skip to content

null array-valued attribute causes the compiler internal error #316

Description

@bleis-tift

Description:

Repro Steps:

open System

type Attr([<ParamArray>] x: obj[]) =
  inherit Attribute()

[<Attr(null)>]
let f () = ()

Expected:
Compilation successful.

Actual:
Compilation error.

error FS0193: internal error: not a nominal type

Version:
I tried VS 2013 only.

Link:
compilation result on ideone

Workaround:
use type annotation.

open System

type Attr([<ParamArray>] x: obj[]) =
  inherit Attribute()

[<Attr(null: string)>]
let f () = ()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions