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

Joint compilation fails for interfaces with primitive fields

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8-beta-1
    • Fix Version/s: 1.7.4, 1.8-beta-1
    • Component/s: Compiler
    • Labels:
      None

      Description

      Try to joint-compile the following Groovy interface:

      interface Bar {
        int bar = 42
      }
      

      Output:

      Compile error during compilation with javac.
      /var/folders/ak/akL02VQpE-qytx-wR1FH3++++TI/-Tmp-/groovy-generated-7418703305781250498-java-source/Bar.java:10: incompatible types
      found   : <nulltype>
      required: int
      int bar = null;
                ^
      1 error
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              pniederw Peter Niederwieser
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: