Skip to content

Commit

Permalink
Merge pull request #9433 from dotty-staging/fix-stdlib-bench
Browse files Browse the repository at this point in the history
Fix #9525: compilation of stdlib
  • Loading branch information
odersky authored Aug 13, 2020
2 parents d420515 + 71fb460 commit a5ae258
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
10 changes: 5 additions & 5 deletions compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,10 @@ object JavaParsers {
// assumed true unless we see public/private/protected
var isPackageAccess = true
var annots = new ListBuffer[Tree]
def addAnnot(sym: ClassSymbol) =
def addAnnot(tpt: Tree) =
annots += atSpan(in.offset) {
in.nextToken()
New(TypeTree(sym.typeRef))
New(tpt)
}

while (true)
Expand Down Expand Up @@ -404,11 +404,11 @@ object JavaParsers {
flags |= Flags.DefaultMethod
in.nextToken()
case NATIVE =>
addAnnot(NativeAnnot)
addAnnot(scalaDot(jtpnme.NATIVEkw))
case TRANSIENT =>
addAnnot(TransientAnnot)
addAnnot(scalaDot(jtpnme.TRANSIENTkw))
case VOLATILE =>
addAnnot(VolatileAnnot)
addAnnot(scalaDot(jtpnme.VOLATILEkw))
case SYNCHRONIZED | STRICTFP =>
in.nextToken()
case _ =>
Expand Down
2 changes: 2 additions & 0 deletions project/scripts/bootstrapCmdTests
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

set -e

source $(dirname $0)/cmdTestsCommon.inc.sh

# check that benchmarks can run
Expand Down
3 changes: 3 additions & 0 deletions tests/pos/i9525/VolatileByteRef.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
public final class VolatileByteRef implements java.io.Serializable {
volatile public byte elem;
}
3 changes: 3 additions & 0 deletions tests/pos/i9525/volatile.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package scala

final class volatile extends scala.annotation.StaticAnnotation

0 comments on commit a5ae258

Please sign in to comment.