mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
parseh: use the decayed type not original type
This commit is contained in:
parent
4c1f0f02d0
commit
c1640a9246
2 changed files with 2 additions and 2 deletions
|
|
@ -481,7 +481,7 @@ static TypeTableEntry *resolve_type_with_table(Context *c, const Type *ty, const
|
||||||
case Type::Decayed:
|
case Type::Decayed:
|
||||||
{
|
{
|
||||||
const DecayedType *decayed_ty = static_cast<const DecayedType *>(ty);
|
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::BlockPointer:
|
||||||
case Type::LValueReference:
|
case Type::LValueReference:
|
||||||
|
|
|
||||||
|
|
@ -1969,7 +1969,7 @@ pub const Bar = enum_Bar;)OUTPUT");
|
||||||
|
|
||||||
add_parseh_case("constant size array", R"SOURCE(
|
add_parseh_case("constant size array", R"SOURCE(
|
||||||
void func(int array[20]);
|
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(
|
add_parseh_case("self referential struct with function pointer", R"SOURCE(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue