File tree 4 files changed +312
-145
lines changed
4 files changed +312
-145
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,6 @@ impl Codegen {
128
128
let inner = self . lift_type ( t. as_ref ( ) ) ;
129
129
CompType :: Vec ( Box :: new ( inner) ) . into ( )
130
130
}
131
- ValueType :: Any => panic ! ( "ValueType::Any" ) ,
132
131
ValueType :: Record ( fields) => {
133
132
let mut rt_fields = Vec :: new ( ) ;
134
133
for ( lab, ty) in fields. iter ( ) {
Original file line number Diff line number Diff line change @@ -667,7 +667,7 @@ impl TryFrom<ValueType> for RustType {
667
667
let inner = Self :: try_from ( t. as_ref ( ) . clone ( ) ) ?;
668
668
Ok ( CompType :: < Box < RustType > > :: Vec ( Box :: new ( inner) ) . into ( ) )
669
669
}
670
- ValueType :: Any | ValueType :: Record ( ..) | ValueType :: Union ( ..) => Err ( value) ,
670
+ ValueType :: Record ( ..) | ValueType :: Union ( ..) => Err ( value) ,
671
671
}
672
672
}
673
673
}
Original file line number Diff line number Diff line change @@ -516,7 +516,7 @@ impl<'a> Compiler<'a> {
516
516
let mut compiler = Compiler :: new ( module) ;
517
517
// type
518
518
let scope = TypeScope :: new ( ) ;
519
- let t = module. infer_format_type ( & scope, format) ?;
519
+ let t = module. infer_format_type ( & scope, format) ?. to_value_type ( ) ;
520
520
// decoder
521
521
compiler. queue_compile ( t, format, Rc :: new ( Next :: Empty ) ) ;
522
522
while let Some ( ( f, next, n) ) = compiler. compile_queue . pop ( ) {
You can’t perform that action at this time.
0 commit comments