From 454816235038540977826f1ab7ba96005639f5e1 Mon Sep 17 00:00:00 2001 From: Gaƫtan Gilbert Date: Tue, 29 Jan 2019 15:44:33 +0100 Subject: Fix #9432: canonical structure and coercion accept universe binders. (when defining a new constant) --- test-suite/bugs/closed/bug_9432.v | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test-suite/bugs/closed/bug_9432.v (limited to 'test-suite') diff --git a/test-suite/bugs/closed/bug_9432.v b/test-suite/bugs/closed/bug_9432.v new file mode 100644 index 0000000000..c074f1cfc1 --- /dev/null +++ b/test-suite/bugs/closed/bug_9432.v @@ -0,0 +1,10 @@ + +Record foo := { f : Type }. + +Fail Canonical Structure xx@{} := {| f := Type |}. + +Canonical Structure xx@{i} := {| f := Type@{i} |}. + +Fail Coercion cc@{} := fun x : Type => Build_foo x. + +Coercion cc@{i} := fun x : Type@{i} => Build_foo x. -- cgit v1.2.3 From 1123165d3186124bd0b72b382d39383aefe347d8 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Wed, 13 Feb 2019 13:48:05 +0100 Subject: more tests --- test-suite/bugs/closed/bug_9432.v | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test-suite') diff --git a/test-suite/bugs/closed/bug_9432.v b/test-suite/bugs/closed/bug_9432.v index c074f1cfc1..c85f8129ce 100644 --- a/test-suite/bugs/closed/bug_9432.v +++ b/test-suite/bugs/closed/bug_9432.v @@ -7,4 +7,6 @@ Canonical Structure xx@{i} := {| f := Type@{i} |}. Fail Coercion cc@{} := fun x : Type => Build_foo x. -Coercion cc@{i} := fun x : Type@{i} => Build_foo x. +Polymorphic Coercion cc@{i} := fun x : Type@{i} => Build_foo x. + +Coercion cc1@{i} := (cc@{i}). -- cgit v1.2.3