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 () = ()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions