Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added InternalAccess to the function call EmitMemberSelect when calle… #2

Merged
merged 1 commit into from
Oct 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Source/Dafny/Compilers/Compiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ protected virtual void EmitMultiAssignment(List<Expression> lhsExprs, List<ILval
var resolved = (MemberSelectExpr)lexpr;
string target = EmitAssignmentLhs(resolved.Obj, wr);
var typeArgs = TypeArgumentInstantiation.ListFromMember(resolved.Member, null, resolved.TypeApplication_JustMember);
ILvalue newLhs = EmitMemberSelect(w => w.Write(target), resolved.Obj.Type, resolved.Member, typeArgs, resolved.TypeArgumentSubstitutionsWithParents(), resolved.Type);
ILvalue newLhs = EmitMemberSelect(w => w.Write(target), resolved.Obj.Type, resolved.Member, typeArgs, resolved.TypeArgumentSubstitutionsWithParents(), resolved.Type, internalAccess: enclosingMethod is Constructor);
lhssn.Add(newLhs);
} else if (lexpr is SeqSelectExpr) {
var seqExpr = (SeqSelectExpr)lexpr;
Expand Down Expand Up @@ -5149,4 +5149,4 @@ public void WriteLegendFile() {
}
}
}
}
}
29 changes: 1 addition & 28 deletions Test/git-issues/git-issue-1111.dfy
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,4 @@ module Foo {
{
var o := new A(1, 2);
}
}

/*
public class A {
public A() {
this._a = java.math.BigInteger.ZERO;
this._b = java.math.BigInteger.ZERO;
}
public void __ctor(java.math.BigInteger k, java.math.BigInteger j)
{
(this)._a = k;
(this)._b = j;
}
public java.math.BigInteger _a;
public java.math.BigInteger a()
{
return this._a;
}
public java.math.BigInteger _b;
public java.math.BigInteger b()
{
return this._b;
}
private static final dafny.TypeDescriptor<A> _TYPE = dafny.TypeDescriptor.referenceWithInitializer(A.class, () -> (A) null);
public static dafny.TypeDescriptor<A> _typeDescriptor() {
return (dafny.TypeDescriptor<A>) (dafny.TypeDescriptor<?>) _TYPE;
}
*/
}