diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-04-18 23:38:15 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-04-18 23:44:11 +0200 |
commit | 3e27fec3cf44bcc523fea6bac39ac9b99b438393 (patch) | |
tree | 8f766d06992528b613171bd1d52d2f3e9de38200 /test/files | |
parent | 4525e9223a2fb7c1ec3014073566b559e5839805 (diff) | |
download | scala-3e27fec3cf44bcc523fea6bac39ac9b99b438393.tar.gz scala-3e27fec3cf44bcc523fea6bac39ac9b99b438393.tar.bz2 scala-3e27fec3cf44bcc523fea6bac39ac9b99b438393.zip |
SI-7388 Be more robust against cycles in error symbol creation.
`Symbol#toString` was triggering `CyclicReferenceError` (specifically,
`accurateKindString` which calls `owner.primaryConstructor`.)
The `toString` output is used when creating an error symbol to
assign to the tree after an error (in this case, a non-existent
access qualifier.)
This commit catches the error, and falls back to just using the
symbol's name.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/t7388.check | 4 | ||||
-rw-r--r-- | test/files/neg/t7388.scala | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/test/files/neg/t7388.check b/test/files/neg/t7388.check new file mode 100644 index 0000000000..0a29e04896 --- /dev/null +++ b/test/files/neg/t7388.check @@ -0,0 +1,4 @@ +t7388.scala:1: error: doesnotexist is not an enclosing class +class Test private[doesnotexist]() + ^ +one error found diff --git a/test/files/neg/t7388.scala b/test/files/neg/t7388.scala new file mode 100644 index 0000000000..9ce9ea11b3 --- /dev/null +++ b/test/files/neg/t7388.scala @@ -0,0 +1 @@ +class Test private[doesnotexist]() |