Github user paulk-asert commented on a diff in the pull request:

    https://github.com/apache/groovy/pull/395#discussion_r76236312
  
    --- Diff: src/spec/test/DesignPatternsTest.groovy ---
    @@ -204,7 +204,7 @@ class DesignPatternsTest extends CompilableTestSupport {
                 // tag::adapter_inheritance_usage[]
                 def hole = new RoundHole(radius: 4.0)
                 (4..7).each { w ->
    -                def peg = new SquarePegAdapter(peg: new SquarePeg(width: 
w))
    +                def peg = new SquarePegAdapter(width: w)
    --- End diff --
    
    Nice catch. This is the  weakness of this example. It uses println 
statements instead of asserts so we just used shouldCompile rather than 
assertScript, otherwise we would have caught this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to