Skip to content

Expected type error on delegate #5607

@auduchinok

Description

@auduchinok
type Foo = delegate of unit -> unit 

let f1 = Foo(ignore)
f1.Invoke()

Foo(ignore).Invoke()
  Library.fs(9, 1): [FS0001] This expression was expected to have type�    'Foo1'    �but here has type�    'unit'

screen shot 2018-09-07 at 16 59 43

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-Compiler-CheckingType checking, attributes and all aspects of logic checkingBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions