Skip to content

Commit 2033b56

Browse files
committed
Merge pull request #106 from DarkDimius/fixes-lazy-vals-typo
Fix build: Fix error in lazy-vals.
2 parents e448049 + 1262f3e commit 2033b56

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/dotty/tools/dotc/transform/LazyVals.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ class LazyValTranformContext {
362362
val setFlag = Select(Ident(helperModule.termRef), LazyVals.Names.setFlag.toTermName)
363363
val wait = Select(Ident(helperModule.termRef), LazyVals.Names.wait4Notification.toTermName)
364364
val state = Select(Ident(helperModule.termRef), LazyVals.Names.state.toTermName)
365-
val cas = Select(Ident(helperModule.termRef), LazyVals.Names.compareAndSet.toTermName)
365+
val cas = Select(Ident(helperModule.termRef), LazyVals.Names.cas.toTermName)
366366

367367
val accessor = mkThreadSafeDef(x.symbol.asTerm, claz, ord, containerSymbol, rhs, x.tpe, offset, getFlag, state, cas, setFlag, wait)
368368
if(flag eq EmptyTree)

test/test/transform/LazyValsTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class LazyValsTest extends DottyTest {
1010
def doNotRewriteObjects = {
1111
checkCompile("LazyVals", "object O"){ (tree, ctx) =>
1212
Assert.assertTrue("local lazy shouldn't rewrite module instance definitions", tree.toString.contains(
13-
"ValDef(Modifiers(final module <stable>,,List()),O,Ident(O$),Apply(Select(New(Ident(O$)),<init>),List()))"
13+
"ValDef(Modifiers(final module <stable>,,List()),O,"
1414
))
1515
}
1616
}

0 commit comments

Comments
 (0)