diff options
author | Martin Odersky <odersky@gmail.com> | 2014-01-07 20:36:11 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-01-07 20:36:11 +0100 |
commit | f2d8f28b1eebfc52b61594bd6607faa581499f03 (patch) | |
tree | 21e4dd85bb63319c07b85593ce78a5afa0e5cd5e /src/dotty/tools/dotc/util/SourceFile.scala | |
parent | 84cbb43bc3e4dc8399202763b371fda57ac3c072 (diff) | |
download | dotty-f2d8f28b1eebfc52b61594bd6607faa581499f03.tar.gz dotty-f2d8f28b1eebfc52b61594bd6607faa581499f03.tar.bz2 dotty-f2d8f28b1eebfc52b61594bd6607faa581499f03.zip |
New subtype constraint maintenance algorithm.
Objective: Avoid cycles by detecting all cases where
A <: B and B <: A
and removing those cases by unifuing A and B.
Cycles need to be avoided because they lead to deep subtype recursions.
Diffstat (limited to 'src/dotty/tools/dotc/util/SourceFile.scala')
-rw-r--r-- | src/dotty/tools/dotc/util/SourceFile.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/util/SourceFile.scala b/src/dotty/tools/dotc/util/SourceFile.scala index 5691ddcb8..4e1eb224a 100644 --- a/src/dotty/tools/dotc/util/SourceFile.scala +++ b/src/dotty/tools/dotc/util/SourceFile.scala @@ -125,6 +125,8 @@ case class SourceFile(file: AbstractFile, content: Array[Char]) { } col + 1 } + + override def toString = file.toString } object NoSource extends SourceFile("<no source>", Nil) { |