aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2016-12-21 22:40:36 +0100
committerGitHub <noreply@github.com>2016-12-21 22:40:36 +0100
commit404ce763d0f9ef82dae52e6aff3ec20950c67e29 (patch)
treee1c1b4ac13d26c214816b2f0582e573298c741f4 /compiler/src/dotty/tools/dotc/core/Types.scala
parentee4f4a109b3ec3190886c75bb6d140087c33287d (diff)
parent9568eba6de7e881c6003dbfc95e46e6f83fa2e7b (diff)
downloaddotty-404ce763d0f9ef82dae52e6aff3ec20950c67e29.tar.gz
dotty-404ce763d0f9ef82dae52e6aff3ec20950c67e29.tar.bz2
dotty-404ce763d0f9ef82dae52e6aff3ec20950c67e29.zip
Merge pull request #1826 from dotty-staging/fix-compile-stdlib
Make more parts of stdlib compile
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/core/Types.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/Types.scala b/compiler/src/dotty/tools/dotc/core/Types.scala
index 64fa48071..636204f64 100644
--- a/compiler/src/dotty/tools/dotc/core/Types.scala
+++ b/compiler/src/dotty/tools/dotc/core/Types.scala
@@ -217,6 +217,14 @@ object Types {
case _ => false
}
+ /** Is this the type of a method with a leading empty parameter list?
+ */
+ def isNullaryMethod(implicit ctx: Context): Boolean = this match {
+ case MethodType(Nil, _) => true
+ case tp: PolyType => tp.resultType.isNullaryMethod
+ case _ => false
+ }
+
/** Is this an alias TypeBounds? */
def isAlias: Boolean = this.isInstanceOf[TypeAlias]