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

Only check for Scala2LocalSuffix in methods on Scala2x classes #16014

Merged
merged 1 commit into from
Sep 12, 2022
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/SymDenotations.scala
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ object SymDenotations {

/** Is this a getter? */
final def isGetter(using Context): Boolean =
this.is(Accessor) && !originalName.isSetterName && !originalName.isScala2LocalSuffix
this.is(Accessor) && !originalName.isSetterName && !(originalName.isScala2LocalSuffix && symbol.owner.is(Scala2x))

/** Is this a setter? */
final def isSetter(using Context): Boolean =
Expand Down
1 change: 1 addition & 0 deletions tests/run/i15943.check
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
asdf
7 changes: 7 additions & 0 deletions tests/run/i15943.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
case class A(`a `: String)

@main
def Test = {
val a = A("asdf")
println(a.`a `)
}