diff options
author | Martin Odersky <odersky@gmail.com> | 2017-03-10 19:38:39 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-03-14 12:05:29 +0100 |
commit | 9d0aa36c879f4bde68e01e0ba9decab21d8fce49 (patch) | |
tree | b8f4e99a9d32f3ba657c9e707d45b91923fdeed9 /compiler/src/dotty/tools/dotc/config/JavaPlatform.scala | |
parent | 3a93b3ee128bae804044b25aa7354ce32e074678 (diff) | |
download | dotty-9d0aa36c879f4bde68e01e0ba9decab21d8fce49.tar.gz dotty-9d0aa36c879f4bde68e01e0ba9decab21d8fce49.tar.bz2 dotty-9d0aa36c879f4bde68e01e0ba9decab21d8fce49.zip |
Construct MethodTypes from parameter closure
To allow for dependencies between method type parameters, construct MethodTypes
from a closure that maps the currently constructed MethodType to its parameter types.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/config/JavaPlatform.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/config/JavaPlatform.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/config/JavaPlatform.scala b/compiler/src/dotty/tools/dotc/config/JavaPlatform.scala index 59201687a..8bc18c387 100644 --- a/compiler/src/dotty/tools/dotc/config/JavaPlatform.scala +++ b/compiler/src/dotty/tools/dotc/config/JavaPlatform.scala @@ -23,7 +23,7 @@ class JavaPlatform extends Platform { // The given symbol is a method with the right name and signature to be a runnable java program. def isJavaMainMethod(sym: SymDenotation)(implicit ctx: Context) = (sym.name == nme.main) && (sym.info match { - case t@MethodType(_, defn.ArrayOf(el) :: Nil) => el =:= defn.StringType && (t.resultType isRef defn.UnitClass) + case MethodTpe(_, defn.ArrayOf(el) :: Nil, restpe) => el =:= defn.StringType && (restpe isRef defn.UnitClass) case _ => false }) |