File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
compiler/src/dotty/tools/dotc/parsing
tests/pos-java-interop/i10868 Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ package parsing
5
5
import dotty .tools .dotc .core .Constants .Constant
6
6
import dotty .tools .dotc .core .Flags
7
7
import dotty .tools .dotc .core .Flags .FlagSet
8
-
8
+ import dotty . tools . dotc . core . NameOps . moduleClassName
9
9
10
10
import JavaTokens ._
11
11
import JavaScanners ._
@@ -206,7 +206,9 @@ object JavaParsers {
206
206
if (in.token == IDENTIFIER ) {
207
207
val name = in.name
208
208
in.nextToken()
209
- name
209
+ if name(name.length - 1 ) == '$'
210
+ then name.slice(0 , name.length - 1 ).moduleClassName
211
+ else name
210
212
}
211
213
else {
212
214
accept(IDENTIFIER )
@@ -285,6 +287,8 @@ object JavaParsers {
285
287
if name(0 ) >= 'A' && name(0 ) <= 'Z'
286
288
then name.toTypeName
287
289
else name.toTermName
290
+ case _ => // semantic name from `O$`
291
+ name.toTermName
288
292
289
293
optArrayBrackets {
290
294
if (in.token == FINAL ) in.nextToken()
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments