File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -577,15 +577,27 @@ impl<'a> CompilationUnit<'a> {
577
577
Some ( type_) if type_ == TypeName :: VOID => None ,
578
578
Some ( type_) => {
579
579
let type_ = self . try_resolve_type ( & type_, scope, decl. span ) ?;
580
- Some ( scope. get_type_index ( & type_, self . pool ) . with_span ( decl. span ) ?)
580
+ match scope. get_type_index ( & type_, self . pool ) {
581
+ Ok ( idx) => Some ( idx) ,
582
+ Err ( err) => {
583
+ self . report ( err. with_span ( decl. span ) ) ?;
584
+ None
585
+ }
586
+ }
581
587
}
582
588
} ;
583
589
584
590
let mut parameters = Vec :: new ( ) ;
585
591
586
592
for param in & spec. source . parameters {
587
593
let type_ = self . try_resolve_type ( & param. type_ , scope, decl. span ) ?;
588
- let type_idx = scope. get_type_index ( & type_, self . pool ) . with_span ( decl. span ) ?;
594
+ let type_idx = match scope. get_type_index ( & type_, self . pool ) {
595
+ Ok ( idx) => idx,
596
+ Err ( err) => {
597
+ self . report ( err. with_span ( decl. span ) ) ?;
598
+ continue ;
599
+ }
600
+ } ;
589
601
let flags = ParameterFlags :: new ( )
590
602
. with_is_optional ( param. qualifiers . contain ( Qualifier :: Optional ) )
591
603
. with_is_out ( param. qualifiers . contain ( Qualifier :: Out ) )
You can’t perform that action at this time.
0 commit comments