diff options
author | Paul Phillips <paulp@improving.org> | 2012-01-14 11:02:46 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-01-14 12:10:00 -0800 |
commit | 2ca7d4ff90fedcd2dba654100bd8d6ce1f1ad36b (patch) | |
tree | 8e2d5ae0d6b435bc56389a88ca098afd4cbf1c6b /test/files/neg/t3240.check | |
parent | 964fc6ee55dec031b5d697114db84a365425baf8 (diff) | |
download | scala-2ca7d4ff90fedcd2dba654100bd8d6ce1f1ad36b.tar.gz scala-2ca7d4ff90fedcd2dba654100bd8d6ce1f1ad36b.tar.bz2 scala-2ca7d4ff90fedcd2dba654100bd8d6ce1f1ad36b.zip |
Symbols making friends with Polly Morphism.
Since I have established (no small effort, this) that there is no need
for certain important flags to be mutable for the entire lifetime of a
symbol, I have codified this knowledge by moving it out of the flags
entirely and into the inheritance hierarchy where its constant nature
can find true happiness.
AliasTypeSymbol ... it's an alias (forever!)
AbstractTypeSymbol ... it's an abstract type (forever!)
The only time DEFERRED is inspected is if the generic creation function
is called (e.g. "newTypeSymbol", not "newAliasType") in which case the
presence of the flag is used to determine which symbol to create. This
is mostly for legacy support.
Certain symbols were being created inconsistently with the others. Now
every symbol is created by invoking a creation method on the owner, with
the exception of FreeVar. I changed the owner of those from RootClass
to NoSymbol because there is no reason for them to pollute the symbol
hierarchy at the root.
The signature of cloneSymbolImpl is now
def cloneSymbolImpl(owner: Symbol, newFlags: Long): Symbol
There is an overload with the old signature which calls that one with no
flags. With this step, every symbol creation in trunk is performed with
knowledge of the initial flags, opening the door to many optimizations
in the Symbol and Type logic, not to mention boosting my sanity by at
least five sanity points.
Diffstat (limited to 'test/files/neg/t3240.check')
-rw-r--r-- | test/files/neg/t3240.check | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/test/files/neg/t3240.check b/test/files/neg/t3240.check index 7ebabd5fcd..efae682c66 100644 --- a/test/files/neg/t3240.check +++ b/test/files/neg/t3240.check @@ -1,7 +1,4 @@ t3240.scala:3: error: only classes can have declared but undefined members type t ^ -t3240.scala:5: error: type arguments [this.t] do not conform to method asInstanceOf's type parameter bounds [T0] - a.getOrElse(defVal).asInstanceOf[t] - ^ -two errors found +one error found |