Skip to content

Commit a5ae258

Browse files
authored
Merge pull request #9433 from dotty-staging/fix-stdlib-bench
Fix #9525: compilation of stdlib
2 parents d420515 + 71fb460 commit a5ae258

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,10 +367,10 @@ object JavaParsers {
367367
// assumed true unless we see public/private/protected
368368
var isPackageAccess = true
369369
var annots = new ListBuffer[Tree]
370-
def addAnnot(sym: ClassSymbol) =
370+
def addAnnot(tpt: Tree) =
371371
annots += atSpan(in.offset) {
372372
in.nextToken()
373-
New(TypeTree(sym.typeRef))
373+
New(tpt)
374374
}
375375

376376
while (true)
@@ -404,11 +404,11 @@ object JavaParsers {
404404
flags |= Flags.DefaultMethod
405405
in.nextToken()
406406
case NATIVE =>
407-
addAnnot(NativeAnnot)
407+
addAnnot(scalaDot(jtpnme.NATIVEkw))
408408
case TRANSIENT =>
409-
addAnnot(TransientAnnot)
409+
addAnnot(scalaDot(jtpnme.TRANSIENTkw))
410410
case VOLATILE =>
411-
addAnnot(VolatileAnnot)
411+
addAnnot(scalaDot(jtpnme.VOLATILEkw))
412412
case SYNCHRONIZED | STRICTFP =>
413413
in.nextToken()
414414
case _ =>

project/scripts/bootstrapCmdTests

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22

3+
set -e
4+
35
source $(dirname $0)/cmdTestsCommon.inc.sh
46

57
# check that benchmarks can run

tests/pos/i9525/VolatileByteRef.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
public final class VolatileByteRef implements java.io.Serializable {
2+
volatile public byte elem;
3+
}

tests/pos/i9525/volatile.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package scala
2+
3+
final class volatile extends scala.annotation.StaticAnnotation

0 commit comments

Comments
 (0)