summaryrefslogtreecommitdiff
path: root/bincompat-forward.whitelist.conf
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-05-22 15:51:18 +0200
committerJason Zaugg <jzaugg@gmail.com>2013-05-23 22:09:55 +0200
commitb941551529e40fc7d71cf25e1ad904ab7badd14c (patch)
tree2c026ad88f27d1d04c4b6f05e63ab19df77ac639 /bincompat-forward.whitelist.conf
parentb45e2b7b30faaa4994740fbe063737934a187d4e (diff)
downloadscala-b941551529e40fc7d71cf25e1ad904ab7badd14c.tar.gz
scala-b941551529e40fc7d71cf25e1ad904ab7badd14c.tar.bz2
scala-b941551529e40fc7d71cf25e1ad904ab7badd14c.zip
SI-6138 Centralize and refine detection of `getClass` calls
`getClass` is special cased in the compiler; this is described in in the comments on `Definitions.Any_getClass`. Part of this happens in `Typer#stabilize`. This was trying to determine if an Ident or Select node was a call to `getClass` by merits of the name of the tree's symbol and by checking that the its type (if it was a MethodType or PolyType) had no parameters in the primary parameter list. Overloaded user defined `getClass` methods confused this check. In the enclosed test case, the tree `definitions.this.getClass` had an `OverloadedType`, and such types always report an empty list of `params`. This commit: - changes `stabilize` to use `isGetClass`, rather than the homebrew check - changes `isGetClass` to consider a `Set[Symbol]` containing all `getClass` variants. This moves some similar code from `Erasure` to `Definitions` - keeps a fast negative path in `isGetClass` based on the symbol's name
Diffstat (limited to 'bincompat-forward.whitelist.conf')
-rw-r--r--bincompat-forward.whitelist.conf8
1 files changed, 8 insertions, 0 deletions
diff --git a/bincompat-forward.whitelist.conf b/bincompat-forward.whitelist.conf
index 83864f48ee..284e0809a8 100644
--- a/bincompat-forward.whitelist.conf
+++ b/bincompat-forward.whitelist.conf
@@ -471,6 +471,14 @@ filter {
{
matchName="scala.concurrent.impl.Promise$CompletionLatch"
problemName=MissingClassProblem
+ },
+ {
+ matchName="scala.reflect.internal.Definitions#DefinitionsClass.getClassMethods"
+ problemName=MissingMethodProblem
+ },
+ {
+ matchName="scala.reflect.internal.Definitions#DefinitionsClass.primitiveGetClassMethods"
+ problemName=MissingMethodProblem
}
]
}