Scala Programming Language
  1. Scala Programming Language
  2. SI-8029

presentation compiler reports false positive: illegal cyclic reference involving package

    Details

      Description

      The following code was extracted from the 3rd assignment on the Coursera Reactive class.

      package object nodescala { 
        trait Subscription
      
        object Subscription {
          def apply() = new Subscription {}
        }
      }
      

      If you open the above file in the Scala IDE for Eclipse and type a whitespace, the presentation compiler will report the following error:

      > illegal cyclic reference involving package nodescala

      While no issue is reported by the build compiler.

      This is a regression wrt 2.10.3, and I hope we can consider it a blocker for 2.10.4-RC1.

      My hope is that it should be relatively easy to create a presentation compiler test that demonstrates the issue. In fact, it should be enough to fully typecheck the source and check if any problem is reported.

        Activity

        Hide
        Jason Zaugg added a comment -

        Marking as a blocker, I'll take a look at this if noone beats me to it.

        Show
        Jason Zaugg added a comment - Marking as a blocker, I'll take a look at this if noone beats me to it.
        Hide
        Jason Zaugg added a comment -

        I could reproduce this in a test case, and have a fix:

        https://github.com/retronym/scala/compare/scala:2.10.x...ticket/8029

        I'll submit a PR tomorrow after I address the small TODOs in the commit message.

        Show
        Jason Zaugg added a comment - I could reproduce this in a test case, and have a fix: https://github.com/retronym/scala/compare/scala:2.10.x...ticket/8029 I'll submit a PR tomorrow after I address the small TODOs in the commit message.
        Show
        Adriaan Moors added a comment - https://github.com/scala/scala/pull/3229

          People

          • Assignee:
            Jason Zaugg
            Reporter:
            Mirco Dotta
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development