Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private BoundExpression XsBindIndexerAccess(BoundExpression expr, BindingDiagnos
{
if (expr is BoundIndexerAccess bia && bia.AccessorKind == AccessorKind.Unknown)
{
expr = bia.Update(AccessorKind.Get);
expr = bia.Update(AccessorKind.Get);
}
return expr;
}
Expand Down Expand Up @@ -186,7 +186,8 @@ public BoundExpression SubtractSystemIndex(BoundExpression index, BindingDiagnos
MethodSymbol symbolOpt = GetWellKnownTypeMember(WellKnownMember.System_Index__ctor, diagnostics, syntax: syntax) as MethodSymbol;
whenFalse = new BoundFromEndIndexExpression(syntax, whenFalse, symbolOpt, index.Type) { WasCompilerGenerated = true };
}
else {
else
{
whenFalse = CreateConversion(whenFalse, index.Type, diagnostics);
whenFalse.WasCompilerGenerated = true;
}
Expand Down Expand Up @@ -828,7 +829,7 @@ private BoundExpression BindXsCast(CastExpressionSyntax node, TypeSymbol targetT
{

// PTR(_Cast, SomeString) or PTR(SomeString)
// Convert to
// Convert to
// PTR(_Cast, PSZ(_Cast, SomeString))
var pszType = Compilation.PszType();
var useSiteInfo = new CompoundUseSiteInfo<AssemblySymbol>(diagnostics, Compilation.Assembly);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,17 @@ private BoundExpression BindXsInvocationExpression(
result = BindInvocationExpression(node, node.Expression, name, boundExpression, analyzedArguments, diagnostics);
if (result is BoundCall bc)
{
// Remove errors about passing property by reference for Clipper Calling Convention
if (bc.Method.HasClipperCallingConvention())
{
if (diagnostics.DiagnosticBag.HasAnyErrors())
{
var errors = diagnostics.DiagnosticBag.AsEnumerable().Where(d => d.Code != (int)ErrorCode.ERR_RefProperty);
diagnostics.Clear();
diagnostics.DiagnosticBag.AddRange(errors);
}
}


// check if MethodSymbol has the NeedAccessToLocals attribute combined with /memvars and the FoxPro Dialect
if (Compilation.Options.Dialect == XSharpDialect.FoxPro &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// </auto-generated>
//------------------------------------------------------------------------------

// Generated from E:\XSharp\Dev30\src\Compiler\src\Compiler\XSharpCodeAnalysis\Parser\XSharp.g4 by ANTLR 4.6.1-SNAPSHOT
// Generated from E:\XSharp\Dev\src\Compiler\src\Compiler\XSharpCodeAnalysis\Parser\XSharp.g4 by ANTLR 4.6.1-SNAPSHOT

// Unreachable code detected
#pragma warning disable 0162
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// </auto-generated>
//------------------------------------------------------------------------------

// Generated from E:\XSharp\Dev30\src\Compiler\src\Compiler\XSharpCodeAnalysis\Parser\XSharp.g4 by ANTLR 4.6.1-SNAPSHOT
// Generated from E:\XSharp\Dev\src\Compiler\src\Compiler\XSharpCodeAnalysis\Parser\XSharp.g4 by ANTLR 4.6.1-SNAPSHOT

// Unreachable code detected
#pragma warning disable 0162
Expand Down
Loading
Loading