summaryrefslogtreecommitdiff
path: root/test/files/run/all-overridden.check
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-02-19 12:57:21 -0800
committerPaul Phillips <paulp@improving.org>2013-02-19 13:07:55 -0800
commit0eff6cd49d32c20d5648b57a01b5e80339a1cca7 (patch)
tree44e41e47efafccc9ccd343e97de69e486e972104 /test/files/run/all-overridden.check
parentbafebe1c161f8db0be758c30fe5cc51082a56427 (diff)
downloadscala-0eff6cd49d32c20d5648b57a01b5e80339a1cca7.tar.gz
scala-0eff6cd49d32c20d5648b57a01b5e80339a1cca7.tar.bz2
scala-0eff6cd49d32c20d5648b57a01b5e80339a1cca7.zip
Fix and optimization in overriding logic.
Given: trait Foo { def f: Int = 5 } trait Bar extends Foo { def f: Int } I noticed allOverriddenSymbols for the abstract f defined in Bar was returning the method from Foo, even though an abstract method cannot override a concrete one. There were other bits of code which accidentally depended on this outcome. Now allOverriddenSymbols for Bar is empty. The optimization is that whether or not a symbol overrides any other symbols is known at creation time and does not change. We now spend a lot less time looking for overridden symbols in base classes by storing that value, "isOverridingSymbol".
Diffstat (limited to 'test/files/run/all-overridden.check')
-rw-r--r--test/files/run/all-overridden.check1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/files/run/all-overridden.check b/test/files/run/all-overridden.check
new file mode 100644
index 0000000000..1b620b1176
--- /dev/null
+++ b/test/files/run/all-overridden.check
@@ -0,0 +1 @@
+method g