summaryrefslogtreecommitdiff
path: root/src/vhdl/translate
diff options
context:
space:
mode:
authorTristan Gingold2015-06-02 20:42:51 +0200
committerTristan Gingold2015-06-02 20:42:51 +0200
commit0a1113743c62e55386837f872b2e0c4ccfb9afb9 (patch)
tree7e17e75d4c208b19d155a019538f0d44973bd2ec /src/vhdl/translate
parent3e6affe81ae722794a3d74e0a480c7d9dacdf406 (diff)
downloadghdl-0a1113743c62e55386837f872b2e0c4ccfb9afb9.tar.gz
ghdl-0a1113743c62e55386837f872b2e0c4ccfb9afb9.tar.bz2
ghdl-0a1113743c62e55386837f872b2e0c4ccfb9afb9.zip
Fix translation of protected types declared in subprograms.
Fix ticket 86.
Diffstat (limited to 'src/vhdl/translate')
-rw-r--r--src/vhdl/translate/trans-chap2.adb3
-rw-r--r--src/vhdl/translate/trans.adb3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/vhdl/translate/trans-chap2.adb b/src/vhdl/translate/trans-chap2.adb
index 69ec3e5..e0c19c6 100644
--- a/src/vhdl/translate/trans-chap2.adb
+++ b/src/vhdl/translate/trans-chap2.adb
@@ -343,7 +343,8 @@ package body Trans.Chap2 is
when Iir_Kind_File_Type_Definition =>
return True;
when Iir_Kind_Protected_Type_Declaration =>
- raise Internal_Error;
+ -- We suppose there is at least one method.
+ return True;
when Iir_Kinds_Composite_Type_Definition =>
-- At least for "=".
return True;
diff --git a/src/vhdl/translate/trans.adb b/src/vhdl/translate/trans.adb
index dbf1696..91ebb9e 100644
--- a/src/vhdl/translate/trans.adb
+++ b/src/vhdl/translate/trans.adb
@@ -242,9 +242,6 @@ package body Trans is
is
Inst : Inst_Build_Acc;
begin
- if Inst_Build /= null and then Inst_Build.Kind /= Instance then
- raise Internal_Error;
- end if;
Inst := new Inst_Build_Type (Instance);
Inst.Prev := Inst_Build;
Inst.Prev_Id_Start := Identifier_Start;