diff options
author | Martin Odersky <odersky@gmail.com> | 2015-01-24 18:19:50 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-01-24 18:26:10 +0100 |
commit | f0e60d30a529c0ce0ca62cc942c0904595ad33b2 (patch) | |
tree | b73d6035b452aeddaf2f11534bdf23d6ad77bc90 /src/dotty/tools/dotc/core/Constraint.scala | |
parent | 25761935463a49376bf4462d89877ccbb823951e (diff) | |
download | dotty-f0e60d30a529c0ce0ca62cc942c0904595ad33b2.tar.gz dotty-f0e60d30a529c0ce0ca62cc942c0904595ad33b2.tar.bz2 dotty-f0e60d30a529c0ce0ca62cc942c0904595ad33b2.zip |
Replace only substitutes top-level types.
See comment in OrderingConstraint#replace.
Diffstat (limited to 'src/dotty/tools/dotc/core/Constraint.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Constraint.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Constraint.scala b/src/dotty/tools/dotc/core/Constraint.scala index cedfb52eb..c4c92d943 100644 --- a/src/dotty/tools/dotc/core/Constraint.scala +++ b/src/dotty/tools/dotc/core/Constraint.scala @@ -102,8 +102,9 @@ abstract class Constraint extends Showable { def unify(p1: PolyParam, p2: PolyParam)(implicit ctx: Context): This /** A new constraint which is derived from this constraint by removing - * the type parameter `param` from the domain and replacing all occurrences + * the type parameter `param` from the domain and replacing all top-level occurrences * of the parameter elsewhere in the constraint by type `tp`. + * Occurrences nested inside a refinement or prefix are not affected. */ def replace(param: PolyParam, tp: Type)(implicit ctx: Context): This |