Skip to content

Commit

Permalink
Fixed the type of a function to be its original return type.
Browse files Browse the repository at this point in the history
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
  • Loading branch information
ddobrev committed Aug 13, 2017
1 parent 94c0838 commit b955068
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/AST/Function.cs
Expand Up @@ -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;
}
}
2 changes: 1 addition & 1 deletion src/Generator/Generators/CSharp/CSharpSources.cs
Expand Up @@ -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)
Expand Down

0 comments on commit b955068

Please sign in to comment.