diff options
author | Martin Odersky <odersky@gmail.com> | 2015-11-05 16:57:54 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-11-05 16:58:18 +0100 |
commit | 9767782a4766826ef903836609cb34c9bad2df61 (patch) | |
tree | 0d67c23e11eb52bdae4b8471aac49086ef5e0cc0 /src/dotty/tools/dotc/transform/PostTyper.scala | |
parent | 5cce9b47427e96ab2159a88137ae74e92939b757 (diff) | |
download | dotty-9767782a4766826ef903836609cb34c9bad2df61.tar.gz dotty-9767782a4766826ef903836609cb34c9bad2df61.tar.bz2 dotty-9767782a4766826ef903836609cb34c9bad2df61.zip |
Check bounds of inferred typevars in PostTyper.
Diffstat (limited to 'src/dotty/tools/dotc/transform/PostTyper.scala')
-rw-r--r-- | src/dotty/tools/dotc/transform/PostTyper.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/transform/PostTyper.scala b/src/dotty/tools/dotc/transform/PostTyper.scala index fc4427277..221d097f9 100644 --- a/src/dotty/tools/dotc/transform/PostTyper.scala +++ b/src/dotty/tools/dotc/transform/PostTyper.scala @@ -68,7 +68,7 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisTran // TODO fill in } - /** Check bounds of AppliedTypeTrees. + /** Check bounds of AppliedTypeTrees and TypeApplys. * Replace type trees with TypeTree nodes. * Replace constant expressions with Literal nodes. * Note: Demanding idempotency instead of purity in literalize is strictly speaking too loose. @@ -114,6 +114,9 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisTran tparam.info.asSeenFrom(tycon.tpe.normalizedPrefix, tparam.owner.owner).bounds) Checking.checkBounds(args, bounds, _.substDealias(tparams, _)) norm(tree) + case TypeApply(fn, args) => + Checking.checkBounds(args, fn.tpe.widen.asInstanceOf[PolyType]) + norm(tree) case _ => norm(tree) } |