mirror of
https://github.com/ziglang/zig.git
synced 2026-02-17 14:59:14 +00:00
parseh: use the decayed type not original type
This commit is contained in:
parent
4c1f0f02d0
commit
c1640a9246
@ -481,7 +481,7 @@ static TypeTableEntry *resolve_type_with_table(Context *c, const Type *ty, const
|
||||
case Type::Decayed:
|
||||
{
|
||||
const DecayedType *decayed_ty = static_cast<const DecayedType *>(ty);
|
||||
return resolve_qual_type(c, decayed_ty->getOriginalType(), decl);
|
||||
return resolve_qual_type(c, decayed_ty->getDecayedType(), decl);
|
||||
}
|
||||
case Type::BlockPointer:
|
||||
case Type::LValueReference:
|
||||
|
||||
@ -1969,7 +1969,7 @@ pub const Bar = enum_Bar;)OUTPUT");
|
||||
|
||||
add_parseh_case("constant size array", R"SOURCE(
|
||||
void func(int array[20]);
|
||||
)SOURCE", 1, R"OUTPUT(pub extern fn func(array: [20]c_int);)OUTPUT");
|
||||
)SOURCE", 1, "pub extern fn func(array: ?&c_int);");
|
||||
|
||||
|
||||
add_parseh_case("self referential struct with function pointer", R"SOURCE(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user