@@ -316,7 +316,7 @@ impl HIRNode {
316316 return Ok ( self . clone ( ) ) ;
317317 }
318318
319- if self_type. can_transmute ( & t, & context. global_scope ) {
319+ if self_type. can_transmute ( & t, & context. global_scope . scope ) {
320320 match & self . kind {
321321 HIRNodeKind :: IntegerLiteral { value, int_type : _ } => {
322322 return Ok ( self . with ( HIRNodeKind :: IntegerLiteral {
@@ -326,7 +326,7 @@ impl HIRNode {
326326 }
327327
328328 HIRNodeKind :: ArrayVariableInitializerValue { vals } => {
329- if can_transmute_inner ( & self_type, & t, & context. global_scope ) {
329+ if can_transmute_inner ( & self_type, & t, & context. global_scope . scope ) {
330330 let mut new_vals = vec ! [ ] ;
331331 let inner = t. get_inner_type ( ) ;
332332
@@ -346,7 +346,7 @@ impl HIRNode {
346346 }
347347
348348 HIRNodeKind :: ArrayVariableInitializerValueSameValue { size, val } => {
349- if can_transmute_inner ( & self_type, & t, & context. global_scope ) {
349+ if can_transmute_inner ( & self_type, & t, & context. global_scope . scope ) {
350350 let new_val = Box :: new ( val. use_as (
351351 context,
352352 curr_ctx,
@@ -379,23 +379,23 @@ impl HIRNode {
379379 return Err ( make_diff_type (
380380 origin,
381381 & "unnamed" . to_string ( ) ,
382- & t. faulty_lowering_generic ( & context. global_scope ) ,
382+ & t. faulty_lowering_generic ( & context. global_scope . scope ) ,
383383 & self
384384 . get_node_type ( context, curr_ctx)
385385 . unwrap ( )
386- . faulty_lowering_generic ( & context. global_scope ) ,
386+ . faulty_lowering_generic ( & context. global_scope . scope ) ,
387387 v,
388388 )
389389 . into ( ) ) ;
390390 }
391391
392392 return Err ( make_diff_type_val (
393393 origin,
394- & t. faulty_lowering_generic ( & context. global_scope ) ,
394+ & t. faulty_lowering_generic ( & context. global_scope . scope ) ,
395395 & self
396396 . get_node_type ( context, curr_ctx)
397397 . unwrap ( )
398- . faulty_lowering_generic ( & context. global_scope ) ,
398+ . faulty_lowering_generic ( & context. global_scope . scope ) ,
399399 )
400400 . into ( ) ) ;
401401 }
0 commit comments