diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2012-12-10 12:16:33 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2012-12-10 12:16:33 -0800 |
commit | 287979d5173005501a699da1c115fbaf9fbffec2 (patch) | |
tree | 1b78bcbcc053c2d5acab4e9e35280baecc41c2d6 /test | |
parent | 4fb23290035a54e34836ac7459afbc384292d7fa (diff) | |
parent | 8a1f85d521399be9141db1da2b0d2bd67cfb39e9 (diff) | |
download | scala-287979d5173005501a699da1c115fbaf9fbffec2.tar.gz scala-287979d5173005501a699da1c115fbaf9fbffec2.tar.bz2 scala-287979d5173005501a699da1c115fbaf9fbffec2.zip |
Merge pull request #1700 from retronym/ticket/6535
SI-6535 Step back from the precipice of a cycle
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/t6535.check | 6 | ||||
-rw-r--r-- | test/files/neg/t6535.scala | 15 |
2 files changed, 21 insertions, 0 deletions
diff --git a/test/files/neg/t6535.check b/test/files/neg/t6535.check new file mode 100644 index 0000000000..1225ea70db --- /dev/null +++ b/test/files/neg/t6535.check @@ -0,0 +1,6 @@ +t6535.scala:2: error: encountered unrecoverable cycle resolving import. +Note: this is often due in part to a class depending on a definition nested within its companion. +If applicable, you may wish to try moving some members into another object. + import Bs.B._ + ^ +one error found diff --git a/test/files/neg/t6535.scala b/test/files/neg/t6535.scala new file mode 100644 index 0000000000..30a750311c --- /dev/null +++ b/test/files/neg/t6535.scala @@ -0,0 +1,15 @@ +object As { + import Bs.B._ + + object A + extends scala.AnyRef // needed for the cycle; + // replacing with a locally defined closs doesn't + // hit the locked import and hence doesn't cycle. +} + +object Bs { + import As.A._ + + object B + extends scala.AnyRef // scala.Immutable, ... +} |