Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for Dynamic interaction with private methods.
Don't let inaccessible methods prevent calls to *Dynamic, otherwise we are at the mercy of every "private" alteration in every class we inherit. Closes SI-5040.
- Loading branch information
Showing
3 changed files
with
23 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
applyDynamic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,11 @@ | |||
abstract class Prova2 extends Dynamic { | |||
def applyDynamic(m: String)(): Unit | |||
private def privateMethod() = println("private method") | |||
} | |||
|
|||
object Test extends App { | |||
val prova= new Prova2 { | |||
def applyDynamic(m: String)() = println("applyDynamic") | |||
} | |||
prova.privateMethod() | |||
} |