Commit c1640a9246

Andrew Kelley <superjoe30@gmail.com>
2016-01-31 21:20:44
parseh: use the decayed type not original type
1 parent 4c1f0f0
Changed files (2)
src/parseh.cpp
@@ -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:
test/run_tests.cpp
@@ -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(