-
Notifications
You must be signed in to change notification settings - Fork 115
Closed
Description
Consider the following specification:
module option {
type Option[a] = None | Some(a)
}
module none {
import option.*
type State = {
x: Option[int],
y: Option[str],
}
var state: State
action init = {
state' = {
x: None,
y: None,
}
}
action step = {
state' = state
}
}The simulator runs on it without any issue:
$ quint run --main=none none.qnt
...
[ok] No violation found (300ms).However, quint verify produces a hard-to-understand error:
$ quint verify --main=none none.qnt
error: internal error: while parsing in Apalache:
'Input was not a valid representation of the QuintIR: Conversion failed while building operator definition `init`: Name None with type (() => None(UNIT) | Some(Str)) constructed in scope where expected type is (() => None(UNIT) | Some(Int)).'
Please report an issue: https://github.com/informalsystems/quint/issues/newWhen I introduce auxiliary pure val definitions for the two cases of None above, everything works. I suspect that the issue is caused by type inference for the two instances of None, which technically should be of the types Option[int] and Option[str].
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels