From 3e27fec3cf44bcc523fea6bac39ac9b99b438393 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Thu, 18 Apr 2013 23:38:15 +0200 Subject: 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. --- test/files/neg/t7388.check | 4 ++++ test/files/neg/t7388.scala | 1 + 2 files changed, 5 insertions(+) create mode 100644 test/files/neg/t7388.check create mode 100644 test/files/neg/t7388.scala (limited to 'test') 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]() -- cgit v1.2.3