Skip to content

The type checker should reject operators that return operators #1212

Open
@konnov

Description

@konnov

The following example should be considered invalid by Quint. I guess, the earliest point where we can complain about it is the type checker:

module test {                                                                 
    // Quint has restrictions on its functional behavior.
    // In particular, it does not allow to return operators!
    def foo(x: int): (int => int) =
      y => x + y
}

This is an MWE of a bug report by @andrey-kuprianov

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions