mirror of
https://github.com/AdaCore/why3.git
synced 2026-02-12 12:34:55 -08:00
23 lines
467 B
Plaintext
23 lines
467 B
Plaintext
module EnumClass
|
|
use mach.java.lang.Integer
|
|
|
|
type kind_of_t = Some_kind | Another_Kind | Some_other_sort
|
|
|
|
type t = {
|
|
kind : kind_of_t;
|
|
dummy_value : integer
|
|
}
|
|
|
|
let constructor [@java:constructor] () = {
|
|
kind = Some_other_sort; dummy_value = 0
|
|
}
|
|
|
|
let get_kind (self : t) = self.kind
|
|
|
|
let get_integer_kind (self : t) : integer =
|
|
match self.kind with
|
|
| Some_kind -> 1
|
|
| Another_Kind -> 0
|
|
| Some_other_sort -> 2
|
|
end
|
|
end |