diff options
author | Olivier Blanvillain <olivier.blanvillain@gmail.com> | 2016-09-16 10:35:56 +0200 |
---|---|---|
committer | Olivier Blanvillain <olivier.blanvillain@gmail.com> | 2016-09-16 10:45:27 +0200 |
commit | 61f7e085ff1c72eee2b61d708a887ee3a6778167 (patch) | |
tree | 42a5a42e6606f326bbd2576aa1642f67e0ab409c /src/dotty/tools/dotc/typer/Checking.scala | |
parent | 5450507c663bca565b2b61b8afb1073c991c9827 (diff) | |
download | dotty-61f7e085ff1c72eee2b61d708a887ee3a6778167.tar.gz dotty-61f7e085ff1c72eee2b61d708a887ee3a6778167.tar.bz2 dotty-61f7e085ff1c72eee2b61d708a887ee3a6778167.zip |
Fix corner case w types ALL passed by name & out of order
This commit removes a problematic duplicated `checkBounds` call on `TypeApply`.
To verify correctness of this change on has to check that `normalizeTree` used only once [1],
and the function using `normalizeTree` already takes care of calling `checkBounds`.
[1]: https://github.com/lampepfl/dotty/blob/0e8f05d88bfef95fac59f522fd9d06792126bd11/src/dotty/tools/dotc/transform/PostTyper.scala#L205
Diffstat (limited to 'src/dotty/tools/dotc/typer/Checking.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Checking.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Checking.scala b/src/dotty/tools/dotc/typer/Checking.scala index d77520c77..101974b32 100644 --- a/src/dotty/tools/dotc/typer/Checking.scala +++ b/src/dotty/tools/dotc/typer/Checking.scala @@ -37,7 +37,7 @@ object Checking { * well as for AppliedTypeTree nodes. Also checks that type arguments to * *-type parameters are fully applied. */ - def checkBounds(args: List[tpd.Tree], boundss: List[TypeBounds], instantiate: (Type, List[Type]) => Type)(implicit ctx: Context) = { + def checkBounds(args: List[tpd.Tree], boundss: List[TypeBounds], instantiate: (Type, List[Type]) => Type)(implicit ctx: Context): Unit = { (args, boundss).zipped.foreach { (arg, bound) => if (!bound.isHK && arg.tpe.isHK) ctx.error(ex"missing type parameter(s) for $arg", arg.pos) |