From 24bfb3baa597cffda9cf5642e61e763bb2f1c320 Mon Sep 17 00:00:00 2001 From: Li Feng Date: Mon, 30 May 2022 09:25:46 +1000 Subject: [PATCH] Fix objc codegen of external types as generic parameters (porting from https://github.com/cross-language-cpp/djinni-generator/pull/132) --- src/source/ObjcMarshal.scala | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/source/ObjcMarshal.scala b/src/source/ObjcMarshal.scala index bf8b88ee..91c87d6f 100644 --- a/src/source/ObjcMarshal.scala +++ b/src/source/ObjcMarshal.scala @@ -175,9 +175,10 @@ class ObjcMarshal(spec: Spec) extends Marshal(spec) { (s"id<${e.objc.typename}>", false) else (e.objc.typename, true) - case _ => if(needRef) (e.objc.boxed, true) - else if (e.objc.generic) (e.objc.typename + args(tm), e.objc.pointer) - else (e.objc.typename, e.objc.pointer) + case _ => + if (e.objc.generic) (e.objc.typename + args(tm), e.objc.pointer) + else if(needRef) (e.objc.boxed, true) + else (e.objc.typename, e.objc.pointer) } case p: MProtobuf => p.body.objc match { case Some(o) => (o.prefix + p.name, true)