fixed #246. adapted check files.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@13324 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
384d87952c
commit
6c0a2df990
|
@ -2260,9 +2260,16 @@ A type's typeSymbol should never be inspected directly.
|
|||
|
||||
/** Map this function over given list of symbols */
|
||||
def mapOver(origSyms: List[Symbol]): List[Symbol] = {
|
||||
val origInfos = origSyms map (_.info)
|
||||
val newInfos = List.mapConserve(origInfos)(this)
|
||||
if (newInfos eq origInfos) origSyms // fast path in case nothing changes due to map
|
||||
var change = false
|
||||
val newInfos = for (sym <- origSyms) yield {
|
||||
val v = variance
|
||||
if (sym.isAliasType) variance = 0
|
||||
val result = this(sym.info)
|
||||
if (result ne sym.info) change = true
|
||||
variance = v
|
||||
result
|
||||
}
|
||||
if (!change) origSyms // fast path in case nothing changes due to map
|
||||
else { // map is not the identity --> do cloning properly
|
||||
val clonedSyms = origSyms map (_.cloneSymbol)
|
||||
val clonedInfos = clonedSyms map (_.info.substSym(origSyms, clonedSyms))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
xmltruncated6.scala:2: error: in XML literal: expected end of Scala block
|
||||
xmltruncated6.scala:2: error: ';' expected but eof found.
|
||||
val stuff = <a>{ "no closing brace"
|
||||
^
|
||||
one error found
|
||||
|
|
|
@ -144,7 +144,7 @@ scala> <console>:1: error: '=' expected but '=>' found.
|
|||
scala> <console>:1: error: identifier expected but integer literal found.
|
||||
[1,2,3]
|
||||
^
|
||||
<console>:1: error: ']' expected but ';' found.
|
||||
<console>:1: error: ']' expected but eof found.
|
||||
[1,2,3]
|
||||
^
|
||||
|
||||
|
|
Loading…
Reference in New Issue