diff options
author | Guillaume Boisseau | 2024-05-27 15:20:52 +0200 |
---|---|---|
committer | GitHub | 2024-05-27 15:20:52 +0200 |
commit | 4f26c7f6f1e554d8ec2f46e868d5dc66c4160d16 (patch) | |
tree | 91c154b6fdc0384e6640e879e140633ffc9599bc /tests/src | |
parent | ad9b5143618537de8377912f8c60cf6375737cb1 (diff) | |
parent | fb16d0af4caacd2c9a3463f6d2b455209b755697 (diff) |
Merge pull request #209 from AeneasVerif/negative-tests
Diffstat (limited to '')
-rw-r--r-- | tests/src/mutually-recursive-traits.lean.out | 17 | ||||
-rw-r--r-- | tests/src/mutually-recursive-traits.rs | 11 | ||||
-rw-r--r-- | tests/src/string-chars.rs | 7 |
3 files changed, 35 insertions, 0 deletions
diff --git a/tests/src/mutually-recursive-traits.lean.out b/tests/src/mutually-recursive-traits.lean.out new file mode 100644 index 00000000..33206fe5 --- /dev/null +++ b/tests/src/mutually-recursive-traits.lean.out @@ -0,0 +1,17 @@ +[[92mInfo[39m ] Imported: tests/llbc/mutually_recursive_traits.llbc +[[91mError[39m] In file Translate.ml, line 813: +Mutually recursive trait declarations are not supported + +Uncaught exception: + + (Failure + "In file Translate.ml, line 813:\ + \nIn file Translate.ml, line 813:\ + \nMutually recursive trait declarations are not supported") + +Raised at Aeneas__Errors.craise_opt_span in file "Errors.ml", line 46, characters 4-76 +Called from Stdlib__List.iter in file "list.ml", line 110, characters 12-15 +Called from Aeneas__Translate.extract_definitions in file "Translate.ml", line 836, characters 2-52 +Called from Aeneas__Translate.extract_file in file "Translate.ml", line 954, characters 2-36 +Called from Aeneas__Translate.translate_crate in file "Translate.ml", line 1502, characters 5-42 +Called from Dune__exe__Main in file "Main.ml", line 276, characters 9-61 diff --git a/tests/src/mutually-recursive-traits.rs b/tests/src/mutually-recursive-traits.rs new file mode 100644 index 00000000..351763b2 --- /dev/null +++ b/tests/src/mutually-recursive-traits.rs @@ -0,0 +1,11 @@ +//@ [lean] known-failure +//@ [coq,fstar] skip +//@ subdir=misc +pub trait Trait1 { + type T: Trait2; +} + +pub trait Trait2: Trait1 {} + +pub trait T1<T: T2<Self>>: Sized {} +pub trait T2<T: T1<Self>>: Sized {} diff --git a/tests/src/string-chars.rs b/tests/src/string-chars.rs new file mode 100644 index 00000000..f8490e76 --- /dev/null +++ b/tests/src/string-chars.rs @@ -0,0 +1,7 @@ +//@ [lean] known-failure +//@ [coq,fstar] skip +//@ no-check-output +fn main() { + let s = "hello"; + let _chs: Vec<char> = s.chars().collect(); +} |