From 42da18cf3aebd2a97b22452c75d40d5a583d5271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20M=C3=A9ric?= Date: Mon, 4 Mar 2024 14:30:58 +0100 Subject: [PATCH] Reference a bug in polymorphic class implementation --- .../Test_Polymorphic_Classes.thy | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Isabelle_DOF-Unit-Tests/Test_Polymorphic_Classes.thy b/Isabelle_DOF-Unit-Tests/Test_Polymorphic_Classes.thy index 0d5aa30..0814421 100644 --- a/Isabelle_DOF-Unit-Tests/Test_Polymorphic_Classes.thy +++ b/Isabelle_DOF-Unit-Tests/Test_Polymorphic_Classes.thy @@ -693,4 +693,24 @@ lemma*[e5::E] testtest : "xx + testtest_level = yy + testtest_level \Indeed this fails:\ (*lemma*[e6::E] testtest : "xx + the (level @{test2 \testtest2''\}) = yy + the (level @{test2 \testtest2''\}) \ xx = yy" by simp*) +text\Bug: Checking of text* type against declare_reference is not done. +Should be compatible with type unification mechanism. See the record package\ +doc_class 'a AAA_test = +aaa::"'a list" + +doc_class 'a BBB_test = +bbb::"'a list" + +declare_reference*[aaa_test::"'a::one AAA"] +text\@{AAA (unchecked) \aaa_test\}\ + +text\bbb_test should fails and trigger an error \ +text*[bbb_test::"'a::one BBB"]\\ + +text*[aaa_test::"int AAA"]\\ + +text\bbb_test should fails and trigger an error \ +text*[aaa_test'::"string AAA"]\\ + + end \ No newline at end of file