From 86bf552cd421288b00525eb1a264652ee32d742d Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sat, 11 Mar 2017 20:52:03 +0100 Subject: Take parameter dependencies into account Take parameter dependencies into account when typechecking arguments. --- compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala') diff --git a/compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala b/compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala index b588e3ae5..77d654ad8 100644 --- a/compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala +++ b/compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala @@ -237,6 +237,12 @@ object ProtoTypes { typer.adapt(targ, formal, arg) } + /** The type of the argument `arg`. + * @pre `arg` ahs been typed before + */ + def typeOfArg(arg: untpd.Tree)(implicit ctx: Context): Type = + myTypedArg(arg).tpe + private var myTupled: Type = NoType /** The same proto-type but with all arguments combined in a single tuple */ -- cgit v1.2.3