Skip to content

Commit

Permalink
Revert bad change
Browse files Browse the repository at this point in the history
  • Loading branch information
RustanLeino committed Jan 15, 2025
1 parent 3dad04a commit 8b428fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/DafnyCore/Backends/Java/JavaCodeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4001,9 +4001,9 @@ protected override ConcreteSyntaxTree EmitCoercionIfNecessary(Type/*?*/ from, Ty
protected override ConcreteSyntaxTree EmitDowncast(Type from, Type to, IOrigin tok, ConcreteSyntaxTree wr) {
var w = new ConcreteSyntaxTree();
if (from != null && to != null && from.IsTraitType && to.AsNewtype != null) {
wr.Write($"(({to.AsNewtype.GetFullCompileName(Options)})({w}))");
wr.Format($"(({to.AsNewtype.GetFullCompileName(Options)})({w}))");
} else if (from != null && to != null && from.AsNewtype != null && to.IsTraitType) {
wr.Write($"(({TypeName(to, wr, tok)})({w}))");
wr.Format($"(({TypeName(to, wr, tok)})({w}))");
} else {
wr.Write($"(({TypeName(to, wr, tok)})(java.lang.Object)(");
w = wr.Fork();
Expand Down

0 comments on commit 8b428fc

Please sign in to comment.