diff options
author | Xiretza <xiretza@xiretza.xyz> | 2022-02-27 12:08:57 +0100 |
---|---|---|
committer | tgingold <tgingold@users.noreply.github.com> | 2022-03-01 07:28:18 +0100 |
commit | b77fd1d48bf1af9fbf5e614cff17053a7277e7e6 (patch) | |
tree | 3b56d3538e35c2dd21eb333d8a1bfd8813634c6d /src | |
parent | eee920287976b0be046dc7a99551d07c96c5a1a3 (diff) | |
download | ghdl-b77fd1d48bf1af9fbf5e614cff17053a7277e7e6.tar.gz ghdl-b77fd1d48bf1af9fbf5e614cff17053a7277e7e6.tar.bz2 ghdl-b77fd1d48bf1af9fbf5e614cff17053a7277e7e6.zip |
vhdl-sem_types: allow methods to return file and protected types in -2019
This implements LCS2016_004:
http://www.eda-twiki.org/cgi-bin/view.cgi/P1076/LCS2016_004
Diffstat (limited to 'src')
-rw-r--r-- | src/vhdl/vhdl-sem_types.adb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-sem_types.adb b/src/vhdl/vhdl-sem_types.adb index 8cde6ea00..bb43d1d40 100644 --- a/src/vhdl/vhdl-sem_types.adb +++ b/src/vhdl/vhdl-sem_types.adb @@ -627,7 +627,9 @@ package body Vhdl.Sem_Types is -- return type of the function must not be of an access type -- or file type; moreover, it must not have a subelement -- that is an access type of a file type. - if Get_Kind (El) = Iir_Kind_Function_Declaration then + if Vhdl_Std < Vhdl_19 + and then Get_Kind (El) = Iir_Kind_Function_Declaration + then Inter_Type := Get_Return_Type (El); if Inter_Type /= Null_Iir and then Get_Signal_Type_Flag (Inter_Type) = False |