From 9d0aa36c879f4bde68e01e0ba9decab21d8fce49 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 10 Mar 2017 19:38:39 +0100 Subject: 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. --- compiler/src/dotty/tools/dotc/config/JavaPlatform.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/src/dotty/tools/dotc/config') 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 }) -- cgit v1.2.3