| ... | ... | @@ -3909,19 +3909,18 @@ fn semaDecl(mod: *Module, decl: *Decl) !bool { |
| 3909 | 3909 | const decl_arena_state = try decl_arena_allocator.create(std.heap.ArenaAllocator.State); |
| 3910 | 3910 | |
| 3911 | 3911 | if (decl.is_usingnamespace) { |
| 3912 | | const ty_ty = Type.initTag(.type); |
| 3913 | | if (!decl_tv.ty.eql(ty_ty, target)) { |
| 3912 | if (!decl_tv.ty.eql(Type.type, target)) { |
| 3914 | 3913 | return sema.fail(&block_scope, src, "expected type, found {}", .{ |
| 3915 | 3914 | decl_tv.ty.fmt(target), |
| 3916 | 3915 | }); |
| 3917 | 3916 | } |
| 3918 | 3917 | var buffer: Value.ToTypeBuffer = undefined; |
| 3919 | | const ty = decl_tv.val.toType(&buffer); |
| 3918 | const ty = try decl_tv.val.toType(&buffer).copy(decl_arena_allocator); |
| 3920 | 3919 | if (ty.getNamespace() == null) { |
| 3921 | 3920 | return sema.fail(&block_scope, src, "type {} has no namespace", .{ty.fmt(target)}); |
| 3922 | 3921 | } |
| 3923 | 3922 | |
| 3924 | | decl.ty = ty_ty; |
| 3923 | decl.ty = Type.type; |
| 3925 | 3924 | decl.val = try Value.Tag.ty.create(decl_arena_allocator, ty); |
| 3926 | 3925 | decl.@"align" = 0; |
| 3927 | 3926 | decl.@"linksection" = null; |