Repository: groovy Updated Branches: refs/heads/master c9eea7c30 -> ef2fbe68d
Recover the GROOVY-4151 test it is deleted by mistake Project: http://git-wip-us.apache.org/repos/asf/groovy/repo Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/ef2fbe68 Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/ef2fbe68 Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/ef2fbe68 Branch: refs/heads/master Commit: ef2fbe68d25ae7dce57ee2580c975c54e3dbaace Parents: c9eea7c Author: sunlan <sun...@apache.org> Authored: Fri May 18 00:43:57 2018 +0800 Committer: sunlan <sun...@apache.org> Committed: Fri May 18 00:43:57 2018 +0800 ---------------------------------------------------------------------- src/test/groovy/bugs/Groovy4151Bug.groovy | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/groovy/blob/ef2fbe68/src/test/groovy/bugs/Groovy4151Bug.groovy ---------------------------------------------------------------------- diff --git a/src/test/groovy/bugs/Groovy4151Bug.groovy b/src/test/groovy/bugs/Groovy4151Bug.groovy new file mode 100644 index 0000000..656f696 --- /dev/null +++ b/src/test/groovy/bugs/Groovy4151Bug.groovy @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package groovy.bugs + +import gls.CompilableTestSupport + +class Groovy4151Bug extends CompilableTestSupport { + void testPrintThisInGString() { + shouldCompile """ + class C4151 { + class S4151 { + S4151() { println "$this" } + } + } + """ + } +} \ No newline at end of file