@@ -445,6 +445,7 @@ impl<'a> AstResolver<'a> {
445445
446446 let mut ty = Interface {
447447 id : None ,
448+ remapped_types : Default :: default ( ) ,
448449 uses : Default :: default ( ) ,
449450 exports : Default :: default ( ) ,
450451 } ;
@@ -483,6 +484,7 @@ impl<'a> AstResolver<'a> {
483484
484485 let mut ty = Interface {
485486 id : Some ( self . id ( decl. id . string ) ) ,
487+ remapped_types : Default :: default ( ) ,
486488 uses : Default :: default ( ) ,
487489 exports : Default :: default ( ) ,
488490 } ;
@@ -1898,7 +1900,13 @@ impl<'a> AstResolver<'a> {
18981900 . with_context ( || format ! ( "mismatched type for export `{name}`" ) ) ,
18991901 ) {
19001902 ( Ok ( _) , Ok ( _) ) => {
1901- // The two are compatible, so do nothing
1903+ // The two are compatible, check for remapped type
1904+ match ( * target_kind, * source_kind) {
1905+ ( ItemKind :: Type ( new) , ItemKind :: Type ( old) ) if new != old => {
1906+ target. remapped_types . entry ( new) . or_default ( ) . insert ( old) ;
1907+ }
1908+ _ => { }
1909+ }
19021910 }
19031911 ( Err ( e) , _) | ( _, Err ( e) ) => {
19041912 // Neither is a subtype of the other, so error
0 commit comments