Skip to content

Fix type inferencing, syntax highlighting and code completion for groovy-contracts #1501

@eric-milles

Description

@eric-milles

Consider the following:

import groovy.contracts.*

@Invariant({ speed >= 0 })
class Rocket {
  int speed
  boolean started = true
  @Requires({ isStarted() && inc > 0 })
  @Ensures ({ isStarted() && old.speed < speed })
  int accelerate(int inc) { speed += inc }
}

Editor support for the condition expressions is pretty minimal.

image

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions