aboutsummaryrefslogtreecommitdiff
path: root/src/dotty
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-07-01 14:47:06 +0200
committerMartin Odersky <odersky@gmail.com>2014-07-17 11:01:59 +0200
commitf0249f2bdd8aeb349309dc1ea6ed248987c800f9 (patch)
tree43d680e3fbcbd2e89d03dc820f679c7e8e873d0f /src/dotty
parent3ab2784948d084557e88cd7eb5c55a29613742d0 (diff)
downloaddotty-f0249f2bdd8aeb349309dc1ea6ed248987c800f9.tar.gz
dotty-f0249f2bdd8aeb349309dc1ea6ed248987c800f9.tar.bz2
dotty-f0249f2bdd8aeb349309dc1ea6ed248987c800f9.zip
Rename SignedType -> MethodicType
... for the common supertype of MethodType, PolyType, and ExprType. Signed was confusing.
Diffstat (limited to 'src/dotty')
-rw-r--r--src/dotty/tools/dotc/core/Denotations.scala2
-rw-r--r--src/dotty/tools/dotc/core/Types.scala8
-rw-r--r--src/dotty/tools/dotc/transform/SuperAccessors.scala8
-rw-r--r--src/dotty/tools/dotc/typer/Applications.scala4
4 files changed, 11 insertions, 11 deletions
diff --git a/src/dotty/tools/dotc/core/Denotations.scala b/src/dotty/tools/dotc/core/Denotations.scala
index 120f8e0f8..bdc67aa08 100644
--- a/src/dotty/tools/dotc/core/Denotations.scala
+++ b/src/dotty/tools/dotc/core/Denotations.scala
@@ -375,7 +375,7 @@ object Denotations {
final def signature(implicit ctx: Context): Signature = {
if (isType) Signature.NotAMethod // don't force info if this is a type SymDenotation
else info match {
- case info: SignedType =>
+ case info: MethodicType =>
try info.signature
catch { // !!! DEBUG
case ex: Throwable =>
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index a92b252b5..dcb1ae491 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -1602,7 +1602,7 @@ object Types {
// and therefore two different poly types would never be equal.
/** A trait that mixes in functionality for signature caching */
- trait SignedType extends Type {
+ trait MethodicType extends Type {
private[this] var mySignature: Signature = _
private[this] var mySignatureRunId: Int = NoRunId
@@ -1610,7 +1610,7 @@ object Types {
protected def computeSignature(implicit ctx: Context): Signature
protected def resultSignature(implicit ctx: Context) = try resultType match {
- case rtp: SignedType => rtp.signature
+ case rtp: MethodicType => rtp.signature
case tp => Signature(tp, isJava = false)
}
catch {
@@ -1628,7 +1628,7 @@ object Types {
}
}
- trait MethodOrPoly extends SignedType
+ trait MethodOrPoly extends MethodicType
abstract case class MethodType(paramNames: List[TermName], paramTypes: List[Type])
(resultTypeExp: MethodType => Type)
@@ -1755,7 +1755,7 @@ object Types {
}
abstract case class ExprType(override val resultType: Type)
- extends CachedProxyType with TermType with SignedType {
+ extends CachedProxyType with TermType with MethodicType {
override def underlying(implicit ctx: Context): Type = resultType
protected def computeSignature(implicit ctx: Context): Signature = resultSignature
def derivedExprType(resultType: Type)(implicit ctx: Context) =
diff --git a/src/dotty/tools/dotc/transform/SuperAccessors.scala b/src/dotty/tools/dotc/transform/SuperAccessors.scala
index fd784862e..27378f533 100644
--- a/src/dotty/tools/dotc/transform/SuperAccessors.scala
+++ b/src/dotty/tools/dotc/transform/SuperAccessors.scala
@@ -78,8 +78,8 @@ class SuperAccessors extends MacroTransform with DenotTransformer { thisTransfor
buf += tree
}
- private def ensureSigned(tpe: Type)(implicit ctx: Context) = tpe match {
- case tpe: SignedType => tpe
+ private def ensureMethodic(tpe: Type)(implicit ctx: Context) = tpe match {
+ case tpe: MethodicType => tpe
case _ => ExprType(tpe)
}
@@ -93,7 +93,7 @@ class SuperAccessors extends MacroTransform with DenotTransformer { thisTransfor
ctx.debuglog(s"add super acc ${sym.showLocated} to $clazz")
val acc = ctx.newSymbol(
clazz, supername, SuperAccessor | Private | Artifact,
- ensureSigned(sel.tpe.widenSingleton), coord = sym.coord).enteredAfter(thisTransformer)
+ ensureMethodic(sel.tpe.widenSingleton), coord = sym.coord).enteredAfter(thisTransformer)
// Diagnostic for SI-7091
if (!accDefs.contains(clazz))
ctx.error(s"Internal error: unable to store accessor definition in ${clazz}. clazz.hasPackageFlag=${clazz is Package}. Accessor required for ${sel} (${sel.show})", sel.pos)
@@ -274,7 +274,7 @@ class SuperAccessors extends MacroTransform with DenotTransformer { thisTransfor
val alias = inheritedAccessor(sym)
if (alias.exists) {
def forwarder(implicit ctx: Context) = {
- sym.copySymDenotation(initFlags = sym.flags | Method, info = ensureSigned(sym.info))
+ sym.copySymDenotation(initFlags = sym.flags | Method, info = ensureMethodic(sym.info))
.installAfter(thisTransformer)
val superAcc =
Select(Super(This(currentClass), tpnme.EMPTY, inConstrCall = false), alias)
diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala
index 91f4ce9a5..99bb82844 100644
--- a/src/dotty/tools/dotc/typer/Applications.scala
+++ b/src/dotty/tools/dotc/typer/Applications.scala
@@ -735,9 +735,9 @@ trait Applications extends Compatibility { self: Typer =>
onMethod(tp, isApplicable(_, args, resultType))
private def onMethod(tp: Type, p: TermRef => Boolean)(implicit ctx: Context): Boolean = tp match {
- case methRef: TermRef if methRef.widenSingleton.isInstanceOf[SignedType] =>
+ case methRef: TermRef if methRef.widenSingleton.isInstanceOf[MethodicType] =>
p(methRef)
- case mt: SignedType =>
+ case mt: MethodicType =>
p(mt.narrow)
case _ =>
tp.member(nme.apply).hasAltWith(d => p(TermRef(tp, nme.apply, d)))