File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -269,7 +269,8 @@ object Parsers {
269
269
def acceptStatSepUnlessAtEnd (altEnd : Token = EOF ) =
270
270
if (! isStatSeqEnd && in.token != altEnd) acceptStatSep()
271
271
272
- def errorTermTree = atPos(in.offset) { Literal (Constant (null )) }
272
+ def errorTermTree =
273
+ Literal (Constant (null )).withPos(Position (in.offset, in.offset))
273
274
274
275
private var inFunReturnType = false
275
276
private def fromWithinReturnType [T ](body : => T ): T = {
Original file line number Diff line number Diff line change
1
+ object DepBug {
2
+ class A {
3
+ class B
4
+ def mkB = new B
5
+ def m (b : B ) = b
6
+ }
7
+ trait Dep {
8
+ val a : A
9
+ val b : a.B
10
+ }
11
+ val dep = new {
12
+ val a = new A
13
+ val b = a mkB
14
+ }
15
+ def useDep (d : Dep ) { // error: procedure syntax
16
+ import d ._
17
+ a m (b)
18
+ }
19
+ { // error: Null does not take parameters (follow on)
20
+ import dep ._
21
+ a m (b)
22
+ }
23
+ dep.a m (dep b) // error (follow on)
24
+ }
You can’t perform that action at this time.
0 commit comments