File tree Expand file tree Collapse file tree 2 files changed +32
-1
lines changed
Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -536,7 +536,7 @@ impl<'a> AnalyzeContext<'a> {
536536 } ;
537537 if !matches ! ( name, ResolvedName :: Final ( ent) if matches!(
538538 ent. kind( ) ,
539- AnyEntKind :: File ( _)
539+ AnyEntKind :: File ( _) | AnyEntKind :: InterfaceFile ( _ )
540540 ) ) {
541541 diagnostics. error ( actual_pos, "Name must denote a file name" ) ;
542542 }
Original file line number Diff line number Diff line change @@ -640,3 +640,34 @@ end architecture foo;
640640 ] ,
641641 )
642642}
643+
644+ #[ test]
645+ fn legal_file_names ( ) {
646+ let mut builder = LibraryBuilder :: new ( ) ;
647+ builder. code (
648+ "libname" ,
649+ "\
650+ use std.textio.all;
651+
652+ package foo is
653+ procedure tee(
654+ file file_handle : text;
655+ variable my_line : inout line
656+ );
657+ end package foo;
658+
659+ package body foo is
660+ procedure tee(
661+ file file_handle : text;
662+ variable my_line : inout line
663+ ) is
664+ variable v_line : line;
665+ begin
666+ write(v_line, my_line.all);
667+ writeline(file_handle, v_line);
668+ end procedure tee;
669+ end package body;
670+ " ,
671+ ) ;
672+ check_no_diagnostics ( & builder. analyze ( ) )
673+ }
You can’t perform that action at this time.
0 commit comments