Skip to content

Commit 2fe076c

Browse files
committed
Avoid datarace error
The previous implementation gave a data race if -Ycheck-no-double-bindings was set. That is, it forced the definition of Predef too early. The new implementation is less elegant, but should fix this problem.
1 parent ac1d6f6 commit 2fe076c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ object JavaParsers {
107107
def arrayOf(tpt: Tree) =
108108
AppliedTypeTree(Ident(nme.Array.toTypeName), List(tpt))
109109

110-
def unimplementedExpr(implicit ctx: Context) = ref(defn.Predef_undefinedR)
110+
def unimplementedExpr(implicit ctx: Context) =
111+
Select(Select(rootDot(nme.scala_), nme.Predef), nme.???)
111112

112113
def makeTemplate(parents: List[Tree], stats: List[Tree], tparams: List[TypeDef], needsDummyConstr: Boolean) = {
113114
def pullOutFirstConstr(stats: List[Tree]): (Tree, List[Tree]) = stats match {

0 commit comments

Comments
 (0)