diff options
Diffstat (limited to 'tests/src/issue-194-recursive-struct-projector.rs')
-rw-r--r-- | tests/src/issue-194-recursive-struct-projector.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/src/issue-194-recursive-struct-projector.rs b/tests/src/issue-194-recursive-struct-projector.rs new file mode 100644 index 00000000..9ebdc2bc --- /dev/null +++ b/tests/src/issue-194-recursive-struct-projector.rs @@ -0,0 +1,16 @@ +//@ [coq,fstar] subdir=misc +struct AVLNode<T> { + value: T, + left: AVLTree<T>, + right: AVLTree<T>, +} + +type AVLTree<T> = Option<Box<AVLNode<T>>>; + +fn get_val<T>(x: AVLNode<T>) -> T { + x.value +} + +fn get_left<T>(x: AVLNode<T>) -> AVLTree<T> { + x.left +} |