Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-7275

SelfType class "was not matched with found receiver" trait

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.0
    • Fix Version/s: 2.4.1
    • Labels:
      None
    • Environment:
      Mac OS X, JDK 1.7 or 1.8

      Description

      I'm trying to compile a Trait that uses:

      @SelfType(BitcoinClient)
      @CompileStatic
      trait BitcoinCLIAPI {
      }
      

      And getting the error message:

      BUG! exception in phase 'instruction selection' in source unit '/Users/sean/git/bitcoin-spock/src/main/groovy/com/msgilligan/bitcoin/rpc/BitcoinCLIAPI.groovy' Declaring class for method call to 'java.util.Map getTransaction(com.google.bitcoin.core.Sha256Hash)' declared in com.msgilligan.bitcoin.rpc.BitcoinClient was not matched with found receiver <UnionTypecom.msgilligan.bitcoin.rpc.BitcoinClient+com.msgilligan.bitcoin.rpc.BitcoinCLIAPI>. This should not have happened!
      

      The source code is available in this Github commit:
      https://github.com/msgilligan/bitcoin-spock/commit/7426210641e6a33bf9a4ad38b1dcd6fa00142cfd

      You'll need to uncomment lines 18 & 19 of BitcoinCLIAPI.groovy to reproduce the bug.

      Compile with Gradle: gradle compileGroovy

      Full error output is attached.

        Attachments

        1. build_err.out
          223 kB
          Sean Gilligan

          Activity

            People

            • Assignee:
              melix C├ędric Champeau
              Reporter:
              msgilligan Sean Gilligan
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: