diff options
author | Martin Odersky <odersky@gmail.com> | 2017-03-11 20:52:03 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-03-14 12:05:29 +0100 |
commit | 86bf552cd421288b00525eb1a264652ee32d742d (patch) | |
tree | 139b0602a72c2e4fdec8f39fdfe596666846b6a1 /compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala | |
parent | 3257dcc590e42b223696b6b8e389e0a3613db93f (diff) | |
download | dotty-86bf552cd421288b00525eb1a264652ee32d742d.tar.gz dotty-86bf552cd421288b00525eb1a264652ee32d742d.tar.bz2 dotty-86bf552cd421288b00525eb1a264652ee32d742d.zip |
Take parameter dependencies into account
Take parameter dependencies into account when typechecking arguments.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala | 6 |
1 files changed, 6 insertions, 0 deletions
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 */ |