File tree 4 files changed +7
-6
lines changed
compiler/src/dotty/tools/dotc/ast 4 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -376,7 +376,8 @@ object Trees {
376
376
val point = span.point
377
377
if (rawMods.is(Synthetic ) || span.isSynthetic || name.toTermName == nme.ERROR ) Span (point)
378
378
else {
379
- val realName = name.stripModuleClassSuffix.lastPart
379
+ val srcName = if symbol.isPackageObject then symbol.owner.name else name
380
+ val realName = srcName.stripModuleClassSuffix.lastPart
380
381
Span (point, point + realName.length, point)
381
382
}
382
383
}
Original file line number Diff line number Diff line change 1
- package object endmark /* <-endmarkers2::package.*/ ers2 :
1
+ package object endmarkers2 /* <-endmarkers2::package.*/ :
2
2
3
3
type Foo /* <-endmarkers2::package.Foo#*/ =
4
4
Unit /* ->scala::Unit#*/
Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ package flags
2
2
3
3
import scala .language /* ->scala::language.*/ .experimental /* ->scala::language.experimental.*/ .macros /* ->scala::language.experimental.macros.*/
4
4
5
- package object p {
6
- p /* <-flags::p::package. */ rivate lazy val x /* <-flags::p::package.x.*/ = 1
5
+ package object p /* <-flags::p::package. */ {
6
+ private lazy val x /* <-flags::p::package.x.*/ = 1
7
7
protected implicit var y /* <-flags::p::package.y().*/ : Int /* ->scala::Int#*/ = 2
8
8
def z /* <-flags::p::package.z().*/ (pp/* <-flags::p::package.z().(pp)*/ : Int /* ->scala::Int#*/ ) = 3
9
9
def m /* <-flags::p::package.m().*/ [TT /* <-flags::p::package.m().[TT]*/ ]: Int /* ->scala::Int#*/ = macro ???/*-> scala:: Predef .`???`().*/
Original file line number Diff line number Diff line change @@ -756,7 +756,7 @@ endmarkers2/package. => final package object endmarkers2
756
756
endmarkers2/package.Foo# => type Foo
757
757
758
758
Occurrences:
759
- [0:15..0:22 ): endmark <- endmarkers2/package.
759
+ [0:15..0:26 ): endmarkers2 <- endmarkers2/package.
760
760
[2:7..2:10): Foo <- endmarkers2/package.Foo#
761
761
[3:4..3:8): Unit -> scala/Unit#
762
762
[4:6..4:9): Foo -> endmarkers2/package.Foo#
@@ -3833,7 +3833,7 @@ Occurrences:
3833
3833
[2:13..2:21): language -> scala/language.
3834
3834
[2:22..2:34): experimental -> scala/language.experimental.
3835
3835
[2:35..2:41): macros -> scala/language.experimental.macros.
3836
- [4:15..5:3): <- flags/p/package.
3836
+ [4:15..4:16): p <- flags/p/package.
3837
3837
[5:2..5:3): p -> flags/p/
3838
3838
[5:19..5:20): x <- flags/p/package.x.
3839
3839
[6:25..6:26): y <- flags/p/package.y().
You can’t perform that action at this time.
0 commit comments