From 18552ba5e763a11366ed4e756972f2cd19c8f797 Mon Sep 17 00:00:00 2001 From: Albert Meltzer <7529386+kitbellew@users.noreply.github.com> Date: Sat, 14 Dec 2019 09:49:59 +0100 Subject: [PATCH] Add the failing tests cited in issue #1599 --- ...SingleArgParenLambdaParamsF_danglingT.stat | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/scalafmt-tests/src/test/resources/newlines/beforeConfigSingleArgParenLambdaParamsF_danglingT.stat b/scalafmt-tests/src/test/resources/newlines/beforeConfigSingleArgParenLambdaParamsF_danglingT.stat index 4d1f58e37d..338ae1e2d3 100644 --- a/scalafmt-tests/src/test/resources/newlines/beforeConfigSingleArgParenLambdaParamsF_danglingT.stat +++ b/scalafmt-tests/src/test/resources/newlines/beforeConfigSingleArgParenLambdaParamsF_danglingT.stat @@ -702,3 +702,42 @@ object a { _ => e ) } +<<< #1599 1: original, with partial func +object A { + def foo() = { + x.map(_.y( + abcd, + { case ((abcdefghij, aswbasdfaw), asfda) => aswdf}, + { case (abcdefghij, sadfasdass) => (asdfa.sadvfs(abcdefghij).get, asdfasdfasfdasda.asdfas(asdfasdaas).get) }, + foo + )) + } +} +>>> +Unable to format file due to bug in scalafmt +<<< #1599 2: modified, with partial func inside block +object A { + def foo() = { + x.map(_.y( + abcd, + {{ case ((abcdefghij, aswbasdfaw), asfda) => aswdf}}, + {{ case (abcdefghij, sadfasdass) => (asdfa.sadvfs(abcdefghij).get, asdfasdfasfdasda.asdfas(asdfasdaas).get) }}, + foo + )) + } +} +>>> +Unable to format file due to bug in scalafmt +<<< #1599 3: modified, with lambda +object A { + def foo() = { + x.map(_.y( + abcd, + { case_abcdefghij_aswbasdfaw_asfda => aswdf}, + { case_abcdefghij_sadfasdass => (asdfa.sadvfs(abcdefghij).get, asdfasdfasfdasda.asdfas(asdfasdaas).get) }, + foo + )) + } +} +>>> +Unable to format file due to bug in scalafmt