File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
compiler/src/dotty/tools/dotc/transform/init Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ class Semantic {
55
55
* V ⊑ R if V ∈ R
56
56
*
57
57
*/
58
- sealed abstract class Value extends Cloneable {
58
+ sealed abstract class Value {
59
59
def show : String = this .toString()
60
60
}
61
61
@@ -142,7 +142,14 @@ class Semantic {
142
142
143
143
/** The environment for method parameters
144
144
*
145
- * For performance and usability, we restrict parameters to be either `Cold` or `Hot`.
145
+ * For performance and usability, we restrict parameters to be either `Cold`
146
+ * or `Hot`.
147
+ *
148
+ * Despite that we have environment for evaluating expressions in secondary
149
+ * constructors (currently we restrict method arguments to be hot), we don't
150
+ * need to put environment as the cache key. The reason is that constructor
151
+ * parameters are determined by the value of `this` --- it suffices to make
152
+ * the value of `this` as part of the cache key.
146
153
*/
147
154
object Env {
148
155
opaque type Env = Map [Symbol , Value ]
You can’t perform that action at this time.
0 commit comments