Skip to content

A code refactoring for explicit return type annotation #15562

@psfinaki

Description

@psfinaki

Given the code
let add x y = x + y

Create a refactoring that would suggesting rewriting it to
let add x y : int = x + y

I think this should be easy. We have:

  1. Machinery to create refactorings
  2. Methods to extract return type info - used in return type hints

Originally posted by @psfinaki in #10421 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions