diff options
author | Martin Odersky <odersky@gmail.com> | 2016-06-29 19:46:39 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-07-11 13:35:01 +0200 |
commit | 0a5f8394a4a226bd3dcf9c966495e653a25ed7d2 (patch) | |
tree | 278a5a4d717bab8a60fcafca02af7563b69e9599 /src/dotty/tools/dotc/core/Types.scala | |
parent | 463e99a48996fbf7148aa62ec6d2f8b28000d2d4 (diff) | |
download | dotty-0a5f8394a4a226bd3dcf9c966495e653a25ed7d2.tar.gz dotty-0a5f8394a4a226bd3dcf9c966495e653a25ed7d2.tar.bz2 dotty-0a5f8394a4a226bd3dcf9c966495e653a25ed7d2.zip |
Avoid infinite recursion when comparing recursive types.
The previous scheme goes into an infinite recursion if the recursive type
does not contain a reference to itself.
Also, make typeParams more defensive
The problematic case is something like
{ z => CC { type hk$0 = z.hk$0; type(param) hk$0 }
Here $hk0 becomes a type parameter through CC and the type lambda.
It's true that such types are eliminated later on. But we want to
avoid mispredictions at all points.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
0 files changed, 0 insertions, 0 deletions