Permalink
Browse files

Fixed the type of a function to be its original return type.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
  • Loading branch information...
ddobrev committed Aug 13, 2017
1 parent 94c0838 commit b955068ad145b63e1326e9cb1d8cb1ab5f97ba18
Showing with 3 additions and 3 deletions.
  1. +2 −2 src/AST/Function.cs
  2. +1 −1 src/Generator/Generators/CSharp/CSharpSources.cs
@@ -258,7 +258,7 @@ public override T Visit<T>(IDeclVisitor<T> visitor)
return visitor.VisitFunctionDecl(this);
}
public Type Type => ReturnType.Type;
public QualifiedType QualifiedType => ReturnType;
public Type Type => OriginalReturnType.Type;
public QualifiedType QualifiedType => OriginalReturnType;
}
}
@@ -937,7 +937,7 @@ private bool WrapSetterArrayOfPointers(string name, Type fieldType)
private void GenerateIndexerSetter(Function function)
{
Type type;
function.Type.IsPointerTo(out type);
function.OriginalReturnType.Type.IsPointerTo(out type);
var @internal = TypePrinter.PrintNative(function.Namespace);
var ctx = new CSharpMarshalContext(Context)

0 comments on commit b955068

Please sign in to comment.