Kaynağa Gözat

[cpp] Correctly type the result of TCasting an interface. Closes #5705

Hugh 9 yıl önce
ebeveyn
işleme
57b67ad10d
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      src/generators/gencpp.ml

+ 2 - 1
src/generators/gencpp.ml

@@ -2885,7 +2885,8 @@ let retype_expression ctx request_type function_args expression_tree forInjectio
             else (match return_type with
             | TCppNativePointer(klass) -> CppCastNative(baseCpp), return_type
             | TCppVoid -> baseCpp.cppexpr, TCppVoid
-            | TCppInterface _
+            | TCppInterface _ ->
+                  baseCpp.cppexpr, return_type
             | TCppDynamic ->
                   baseCpp.cppexpr, baseCpp.cpptype
             | _ ->