summaryrefslogtreecommitdiff
path: root/src/reflect
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2015-09-24 18:48:06 +0300
committerAdriaan Moors <adriaan.moors@typesafe.com>2016-03-26 09:31:13 -0700
commit4f4fb45d7bc41564c3ba0483c5a663172e063994 (patch)
tree1b48a486e1fe93ac92a8beda03c60911fefbd613 /src/reflect
parent66b038976d435472b2e5c9720ff2e8cc42177b1a (diff)
downloadscala-4f4fb45d7bc41564c3ba0483c5a663172e063994.tar.gz
scala-4f4fb45d7bc41564c3ba0483c5a663172e063994.tar.bz2
scala-4f4fb45d7bc41564c3ba0483c5a663172e063994.zip
SI-9415 Turn on SAM by default
Initial work to change settings and test by Svyatoslav Ilinskiy Thanks! To avoid cycles during overload resolution (which showed up during bootstrapping), and to improve performance, I've guarded the detection of SAM types in `isCompatible` to cases when the LHS is potentially compatible.
Diffstat (limited to 'src/reflect')
-rw-r--r--src/reflect/scala/reflect/internal/Definitions.scala4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/reflect/scala/reflect/internal/Definitions.scala b/src/reflect/scala/reflect/internal/Definitions.scala
index 48caf3081a..a031f4f797 100644
--- a/src/reflect/scala/reflect/internal/Definitions.scala
+++ b/src/reflect/scala/reflect/internal/Definitions.scala
@@ -809,9 +809,7 @@ trait Definitions extends api.StandardDefinitions {
* The class defining the method is a supertype of `tp` that
* has a public no-arg primary constructor.
*/
- def samOf(tp: Type): Symbol = if (!settings.Xexperimental) NoSymbol else findSam(tp)
-
- def findSam(tp: Type): Symbol = {
+ def samOf(tp: Type): Symbol = {
// if tp has a constructor, it must be public and must not take any arguments
// (not even an implicit argument list -- to keep it simple for now)
val tpSym = tp.typeSymbol