Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 2.13.7 releaseFence regression affecting GraalVM compatibility #9825

Merged
merged 1 commit into from Dec 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -750,7 +750,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers {

for (m <- normMembers) {
if (!needsSpecialization(fullEnv, m)) {
if (m.isValue && !m.isMutable && !m.isMethod && !m.isDeferred && !m.isLazy) {
if (m.isValue && !m.isMutable && !m.isMethod && !m.isDeferred && !m.isLazy && !m.isParamAccessor) {
// non-specialized `val` fields are made mutable (in Constructors) and assigned from the
// constructors of specialized subclasses. See PR scala/scala#9704.
clazz.primaryConstructor.updateAttachment(ConstructorNeedsFence)
Expand Down
2 changes: 1 addition & 1 deletion test/junit/scala/tools/nsc/backend/jvm/BytecodeTest.scala
Expand Up @@ -393,7 +393,7 @@ class BytecodeTest extends BytecodeTesting {
@Test
def nonSpecializedValFence(): Unit = {
def code(u1: String) =
s"""abstract class Speck[@specialized(Int) T](t: T) {
s"""abstract class Speck[@specialized(Int) T](t: T, sm: String, val sn: String) {
| val a = t
| $u1
| lazy val u2 = "?"
Expand Down