| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Scala
Revision: 16036
Author: odersky
Date: 05 Sep 2008 10:34:25
Diff at Trac: https://lampsvn.epfl.ch/trac/scala/changeset/16036
Changes:refined volatile checking
Files:| ... | ...@@ -1166,8 +1166,9 @@ | |
| 1166 | 1166 | else super.normalize |
| 1167 | 1167 | |
| 1168 | 1168 | /** A refined type P1 with ... with Pn { decls } is volatile if |
| 1169 | * one of the parent types Pi is an abstract type, and either decls | |
| 1170 | * or a following parent Pj, j > i, contributes an abstract member. | |
| 1169 | * one of the parent types Pi is an abstract type, and | |
| 1170 | * either i > 1, or decls or a following parent Pj, j > 1, contributes | |
| 1171 | * an abstract member. | |
| 1171 | 1172 | * A type contributes an abstract member if it has an abstract member which |
| 1172 | 1173 | * is also a member of the whole refined type. A scope `decls' contributes |
| 1173 | 1174 | * an abstract member if it has an abstract definition which is also |
| ... | ...@@ -1180,8 +1181,9 @@ | |
| 1180 | 1181 | p.deferredMembers exists isVisible |
| 1181 | 1182 | |
| 1182 | 1183 | parents dropWhile (! _.typeSymbol.isAbstractType) match { |
| 1183 | case _ :: ps => | |
| 1184 | (ps exists contributesAbstractMembers) || | |
| 1184 | case ps @ (_ :: ps1) => | |
| 1185 | (ps ne parents) || | |
| 1186 | (ps1 exists contributesAbstractMembers) || | |
| 1185 | 1187 | (decls.elements exists (m => m.isDeferred && isVisible(m))) |
| 1186 | 1188 | case _ => |
| 1187 | 1189 | false |