diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2012-11-10 21:30:00 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2012-11-10 23:42:57 +0100 |
commit | 86e045e2863b04bf4af4abb5c2ce345bcdae2b80 (patch) | |
tree | d307c1f495e4ac3dc5d77a4ff8872a2561acd265 /src/reflect/scala/reflect/internal/Symbols.scala | |
parent | 0b59b4627a76d99531a51c7f17bbfa8b9c8c4bd8 (diff) | |
download | scala-86e045e2863b04bf4af4abb5c2ce345bcdae2b80.tar.gz scala-86e045e2863b04bf4af4abb5c2ce345bcdae2b80.tar.bz2 scala-86e045e2863b04bf4af4abb5c2ce345bcdae2b80.zip |
Refine the message and triggering of MissingRequirementError.
- To force a failure of the stub, call a new method `failIfStub`
rather than `info`.
- Offer a broader range of potential root causes in the
error message.
Diffstat (limited to 'src/reflect/scala/reflect/internal/Symbols.scala')
-rw-r--r-- | src/reflect/scala/reflect/internal/Symbols.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/reflect/scala/reflect/internal/Symbols.scala b/src/reflect/scala/reflect/internal/Symbols.scala index 33d99b35d8..67b2d05224 100644 --- a/src/reflect/scala/reflect/internal/Symbols.scala +++ b/src/reflect/scala/reflect/internal/Symbols.scala @@ -1344,6 +1344,9 @@ trait Symbols extends api.Symbols { self: SymbolTable => } } + /** Raises a `MissingRequirementError` if this symbol is a `StubSymbol` */ + def failIfStub() {} + /** Initialize the symbol */ final def initialize: this.type = { if (!isInitialized) info @@ -3100,6 +3103,7 @@ trait Symbols extends api.Symbols { self: SymbolTable => ) } trait StubSymbol extends Symbol { + override final def failIfStub() = fail(()) protected def missingMessage: String private def fail[T](alt: T): T = { // Avoid issuing lots of redundant errors |