Skip to content

Commit

Permalink
another fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cdietrich committed Jul 31, 2024
1 parent d9bf5f6 commit 8542c06
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2013, 2016 itemis AG (http://www.itemis.eu) and others.
* Copyright (c) 2013, 2024 itemis AG (http://www.itemis.eu) and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
Expand Down Expand Up @@ -60,10 +60,8 @@ class CompilerBug406549Test extends AbstractXtendCompilerTest {
}
public void m(final T a, final T b) {
final Procedure1<Test<T>> _function = new Procedure1<Test<T>>() {
public void apply(final Test<T> it) {
new Test<T>().m(a, b);
}
final Procedure1<Test<T>> _function = (Test<T> it) -> {
new Test<T>().m(a, b);
};
ObjectExtensions.<Test<T>>operator_doubleArrow(this, _function);
}
Expand Down Expand Up @@ -94,12 +92,10 @@ class CompilerBug406549Test extends AbstractXtendCompilerTest {
public StringBuilder m() {
StringBuilder _stringBuilder = new StringBuilder();
final Procedure1<StringBuilder> _function = new Procedure1<StringBuilder>() {
public void apply(final StringBuilder it) {
Test<Object> _test = new Test<Object>();
Long _long = new Long(0);
_test.m(it, _long);
}
final Procedure1<StringBuilder> _function = (StringBuilder it) -> {
Test<Object> _test = new Test<Object>();
Long _long = new Long(0);
_test.m(it, _long);
};
return ObjectExtensions.<StringBuilder>operator_doubleArrow(_stringBuilder, _function);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013, 2016 itemis AG (http://www.itemis.eu) and others.
* Copyright (c) 2013, 2024 itemis AG (http://www.itemis.eu) and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
Expand Down Expand Up @@ -113,17 +113,11 @@ public void testBug406549_02() {
_builder_1.append("public void m(final T a, final T b) {");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append("final Procedure1<Test<T>> _function = new Procedure1<Test<T>>() {");
_builder_1.append("final Procedure1<Test<T>> _function = (Test<T> it) -> {");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append("public void apply(final Test<T> it) {");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append("new Test<T>().m(a, b);");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append("}");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append("};");
_builder_1.newLine();
Expand Down Expand Up @@ -190,22 +184,16 @@ public void testBug406549_03() {
_builder_1.append("StringBuilder _stringBuilder = new StringBuilder();");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append("final Procedure1<StringBuilder> _function = new Procedure1<StringBuilder>() {");
_builder_1.append("final Procedure1<StringBuilder> _function = (StringBuilder it) -> {");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append("public void apply(final StringBuilder it) {");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append("Test<Object> _test = new Test<Object>();");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append(" ");
_builder_1.append("Long _long = new Long(0);");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append("_test.m(it, _long);");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append("}");
_builder_1.append("_test.m(it, _long);");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append("};");
Expand Down

0 comments on commit 8542c06

Please sign in to comment.