Closes #4163. no review
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24458 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
8c49e09c04
commit
83152c9af1
|
|
@ -977,7 +977,10 @@ self =>
|
|||
def selector(t: Tree): Tree = {
|
||||
val point = in.offset
|
||||
//assert(t.pos.isDefined, t)
|
||||
Select(t, ident(false)) setPos r2p(t.pos.startOrPoint, point, in.lastOffset)
|
||||
if (t != EmptyTree)
|
||||
Select(t, ident(false)) setPos r2p(t.pos.startOrPoint, point, in.lastOffset)
|
||||
else
|
||||
errorTermTree // has already been reported
|
||||
}
|
||||
|
||||
/** Path ::= StableId
|
||||
|
|
@ -1429,7 +1432,7 @@ self =>
|
|||
val t =
|
||||
if (isLiteral) atPos(in.offset)(literal(false))
|
||||
else in.token match {
|
||||
case XMLSTART =>
|
||||
case XMLSTART =>
|
||||
xmlLiteral()
|
||||
case IDENTIFIER | BACKQUOTED_IDENT | THIS | SUPER =>
|
||||
path(true, false)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
t4163.scala:4: error: '<-' expected but '=' found.
|
||||
x = 3
|
||||
^
|
||||
t4163.scala:5: error: illegal start of simple expression
|
||||
y <- 0 to 100
|
||||
^
|
||||
two errors found
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
class Bug {
|
||||
val z = (
|
||||
for {
|
||||
x = 3
|
||||
y <- 0 to 100
|
||||
} yield y
|
||||
).toArray
|
||||
}
|
||||
Loading…
Reference in New Issue