Skip to content

Commit bb59d81

Browse files
committed
Check AppliedTypeTrees bounds inside AppliedTypeTree
1 parent 06e18c6 commit bb59d81

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/dotty/tools/dotc/typer/Checking.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ object Checking {
5656
val bounds = tparams.map(tparam =>
5757
tparam.info.asSeenFrom(tycon.tpe.normalizedPrefix, tparam.owner.owner).bounds)
5858
checkBounds(args, bounds, _.substDealias(tparams, _))
59-
case _ => traverseChildren(tree)
59+
case _ =>
6060
}
61+
traverseChildren(tree)
6162
}
6263

6364
/** Check that `tp` refers to a nonAbstract class

tests/neg/nested_bounds.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class OnlyInt[T <: Int]
2+
3+
object Test {
4+
type T = List[OnlyInt[String]] // error
5+
}

0 commit comments

Comments
 (0)