summaryrefslogtreecommitdiff
path: root/test/files/neg
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'paulp/topic/gitattributes' into 2.10.xPaul Phillips2012-09-2073-605/+605
|\
| * Normalized line endings.Paul Phillips2012-09-2073-605/+605
| | | | | | | | | | | | This brings all the files into line with the .gitattributes settings, which should henceforth be automatically maintained by git.
* | Merge pull request #1325 from odersky/ticket/6337Paul Phillips2012-09-203-8/+36
|\ \ | | | | | | Fixes SI-6337 by disallowing nested value classes.
| * | Fixes SI-6337 by disallowing nested value classes.Martin Odersky2012-09-173-8/+36
| | | | | | | | | | | | It seems for the moment too hard to allow this, and the functionality to have value classes wrap other value classes does not seem essential.
* | | Merge pull request #1356 from paulp/pullreq-1342Josh Suereth2012-09-205-13/+17
|\ \ \ | | | | | | | | Pullreq 1342
| * | | Error message improvement for SI-6336.Paul Phillips2012-09-194-13/+13
| | | | | | | | | | | | | | | | | | | | Position error messages about structural type members at the problematic parameter or type.
| * | | SI-6336 Now also catches return typesMartin Odersky2012-09-182-1/+5
| | | | | | | | | | | | | | | | | | | | As Mark's comments on SI-6336 shows, we also need to disallow value classes as return types of structural types.
* | | | Merge pull request #1339 from rkuhn/wip-6389-finite-duration-multJosh Suereth2012-09-202-7/+7
|\ \ \ \ | |_|_|/ |/| | | enable integer multiplication/divison on FiniteDuration, see SI-6389
| * | | move Duration (incl. DSL) into scala.concurrent.duration packageRoland2012-09-192-7/+7
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | so that the full package can be imported naturally: import scala.concurrent.duration._ will give you all the types (Duration, FiniteDuration, Deadline) and the DSL for constructing these.
* | | New test case for closing SI-6385Martin Odersky2012-09-202-0/+20
| | | | | | | | | | | | | | | The fixes for SI-6260 + elimination of hlaf-boxing also solve SI-6385
* | | Value classes: eliminated half-boxingMartin Odersky2012-09-202-0/+30
| | | | | | | | | | | | | | | | | | | | | We now apply erasure of value classes everywhere. previously, erasure was disabled in the value class itself. This led to irregegularities and bugs. See test run/valueclasses-pavlov.scala for something that led to a ClassCastException before.
* | | Fixes SI-6260Martin Odersky2012-09-202-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | Guards against bridge methods that clash with other methods. Two tests: The neg test is the original ticket. The run test tweaks things slightly so that the generated bridge method does not clash, and tests that the necessary unboxings are indeed performed at runtime.
* | | Merge pull request #1354 from scalamacros/ticket/6363Eugene Burmako2012-09-192-3/+4
|\ \ \ | | | | | | | | merges scala.reflect.base into scala.reflect.api
| * | | SI-6363 removes scala.reflect.baseEugene Burmako2012-09-192-3/+4
| | | | | | | | | | | | | | | | | | | | As the experience has shown, there's no need for a separate layer of reflection in scala-library.jar. Therefore I'm putting an end to it.
* | | | Fixes SI-6354: improved error messages for Dynamic signature mismatches.amin2012-09-193-2/+74
|/ / / | | | | | | | | | | | | | | | If an error occurs afer a Dynamic rewriting, augment the error message with the rewritten tree and a hint to check the Dynamic method signature.
* | | Merge pull request #1340 from gkossakowski/revert-static-annotationGrzegorz Kossakowski2012-09-185-104/+0
|\ \ \ | |_|/ |/| | Revert `@static` annotation
| * | Revert "Implement @static annotation on singleton object fields."Grzegorz Kossakowski2012-09-172-43/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 892ee3df93a10ffe24fb11b37ad7c3a9cb93d5de with exception of keeping `@static` annotation in the library so we can deploy a new starr that does not depend on it before removing it completely. Conflicts: src/compiler/scala/tools/nsc/backend/icode/GenICode.scala src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala src/compiler/scala/tools/nsc/transform/CleanUp.scala
| * | Revert "WIP add private/lazy checks and a few tests."Grzegorz Kossakowski2012-09-172-24/+1
| | | | | | | | | | | | This reverts commit 227239018b38ab7218ee6b30493c9c8e1836c8c9.
| * | Revert "Fixes SI-6189."Grzegorz Kossakowski2012-09-171-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5a8dfad583b825158cf0abdae5d73a4a7f8cd997. Conflicts: src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
| * | Revert "Fix SI-4581."Grzegorz Kossakowski2012-09-174-33/+1
| |/ | | | | | | This reverts commit 373f22a2022519ab894c1ea77460e6460d7c2ee4.
* / SI-5692 better error messageEugene Burmako2012-09-188-0/+28
|/ | | | | | Doesn't fix the underlying issue with macros and type inference, but at least now the error message says exactly what needs to be done to make the error go away.
* SI-6336 Disallows value types in structuralal refinementsMartin Odersky2012-09-162-0/+15
| | | | | Structural refinements already have a number of restrictions, e.g. cannot refer to type parameters of enclosing classes. We need to disallow value classes as well.
* Merge pull request #1302 from scalamacros/topic/reflectionEugene Burmako2012-09-146-6/+6
|\ | | | | cleaning up reflection
| * SI-6342 cleans up toolbox APIEugene Burmako2012-09-156-6/+6
| | | | | | | | | | | | 1) parseExpr => parse 2) runExpr => eval 3) Introduces compile(Tree): () => Any, since it has frequent uses
* | Merge pull request #1290 from retronym/ticket/no-implicit-to-anyrefPaul Phillips2012-09-142-0/+57
|\ \ | | | | | | A little cleanup along the Any to AnyRef trail.
| * | A little cleanup along the Any to AnyRef trail.Jason Zaugg2012-09-112-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | Followup to 35316be and d3f879a. - Remove obsolete comments and replace them with a test. - Don't emit error addendum unless we know we're dealing with a value class.
* | | Merge pull request #1299 from namin/si-6245Paul Phillips2012-09-146-0/+60
|\ \ \ | |_|/ |/| | Fix for SI-6245 with workaround for SI-2296.
| * | Fix for SI-6245 with workaround for SI-2296.amin2012-09-136-0/+60
| | | | | | | | | | | | | | | | | | | | | protected/super accessor issue: Don't subvert the creation of the standard protected accessor with the java interop accessor. For SI-2296, the compiler emits an error instead of causing an illegal access error at runtime.
* | | Eliminate breaking relative names in source.Paul Phillips2012-09-143-35/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These things are killing me. Constructions like package scala.foo.bar.baz import foo.Other DO NOT WORK in general. Such files are not really in the "scala" package, because it is not declared package scala package foo.bar.baz And there is a second problem: using a relative path name means compilation will fail in the presence of a directory of the same name, e.g. % mkdir reflect % scalac src/reflect/scala/reflect/internal/util/Position.scala src/reflect/scala/reflect/internal/util/Position.scala:9: error: object ClassTag is not a member of package reflect import reflect.ClassTag ^ src/reflect/scala/reflect/internal/util/Position.scala:10: error: object base is not a member of package reflect import reflect.base.Attachments ^ As a rule, do not use relative package paths unless you have explicitly imported the path to which you think you are relative. Better yet, don't use them at all. Unfortunately they mostly work because scala variously thinks everything scala.* is in the scala package and/or because you usually aren't bootstrapping and it falls through to an existing version of the class already on the classpath. Making the paths explicit is not a complete solution - in particular, we remain enormously vulnerable to any directory or package called "scala" which isn't ours - but it greatly limts the severity of the problem.
* | | Merge pull request #1295 from scalamacros/ticket/6323Eugene Burmako2012-09-1417-28/+59
|\ \ \ | | | | | | | | improvements for type tags
| * | | SI-6310 AbsTypeTag => WeakTypeTagEugene Burmako2012-09-1414-28/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new name for AbsTypeTag was a matter of a lengthy discussion: http://groups.google.com/group/scala-internals/browse_thread/thread/fb2007e61b505c4d I couldn't decide until having fixed SI-6323 today, which is about trying to reflect against a local class using typeOf. The problem with local classes is that they aren't pickled, so their metadata isn't preserved between Scala compilation runs. Sure, we can restore some of that metadata with Java reflection, but you get the idea. Before today typeOf of a local class created a free type, a synthetic symbol, with a bunch of synthetic children that remember the metadata, effectively creating a mini symbol table. That might be useful at time, but the problem is that this free type cannot be reflected, because the global symbol table of Scala reflection doesn't know about its mini symbol table. And then it struck me. It's not the presence of abs types (type parameters and abs type members) that differentiates arbitrary type tags from good type tags. It's the presence of types that don't map well on the runtime world - ones that can't be used to instantiate values, ones that can't be reflected. So we just need a name for these types. Phantom types are compile-time only concept, whereas our types can have partial correspondence with the runtime. "Weak types" sound more or less okish, so let's try them out.
| * | | SI-6323 outlaws free types from TypeTagEugene Burmako2012-09-143-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Free types are no longer acceptable in normal type tags. Like type parameters or abstract type members they don't map on any real type, therefore I think this is a justified change. The main reason for doing is this is to prohibit people from using `typeOf` on local classes. Sure, the guard introduced in the previous commit will raise runtime errors about that, but this commit provides static checking. Those especially persistent might use `absTypeOf` and then try to play around with the weak type it returns, but that's advanced usage scenario, and I don't worry much about it. Bottom line: `typeOf` should just work. Things that work with additional effort should be explicitly marked as such.
* | | | Merge pull request #1272 from paulp/issue/6340Josh Suereth2012-09-142-0/+31
|\ \ \ \ | |/ / / |/| | | Fix for SI-6340, error message regression.
| * | | Fix for SI-6340, error message regression.Paul Phillips2012-09-122-0/+31
| | |/ | |/|
* | | Merge pull request #1300 from retronym/ticket/6359Josh Suereth2012-09-132-0/+15
|\ \ \ | |_|/ |/| | SI-6359 Deep prohibition of templates in value class
| * | SI-6359 Deep prohibition of templates in value classJason Zaugg2012-09-142-0/+15
| |/ | | | | | | This seems to have been the intent of 95d532 / SI-5882.
* | Better error message for pattern arity errors.Paul Phillips2012-09-123-1/+11
| | | | | | | | | | | | Because friends don't tell friends: "wrong number of arguments for <none>"
* | Merge remote-tracking branch 'origin/2.10.x' into fix-duration-issues-RKRoland2012-09-1219-5/+192
|\ \
| * | Avoid spurious warning for `def foo = x.foo`.Jason Zaugg2012-09-112-6/+27
| |/ | | | | | | Followup to SI-6276.
| * Merge pull request #1274 from retronym/ticket/6335Grzegorz Kossakowski2012-09-112-0/+16
| |\ | | | | | | SI-6335 More precise location of the implicit class synthetic method.
| | * More tests for SI-6335.Jason Zaugg2012-09-092-0/+16
| | |
| * | Merge pull request #1284 from retronym/topic/deprecated-inheritanceGrzegorz Kossakowski2012-09-116-0/+55
| |\ \ | | | | | | | | SI-6162 Adds private[scala] @deprecatedInheritance/@deprecatedOverriding
| | * | Rescues @deprecated{Inheritance, Overriding}Jason Zaugg2012-09-114-6/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While they ought to be generalized to aribirary modifier changes before being offered in the standard library, the opportunity to use them in 2.10 is too important to pass up. So for now, they're private[scala]. En route: - made the error messages more concise - fix positioning of inheritance error - improve test coverage
| | * | SI-6162 Adds @deprecatedInheritance/@deprecatedOverridingSimon Ochsenreither2012-09-106-0/+22
| | |/ | | | | | | | | | | | | | | | | | | | | | These annotations are meant to warn from inheriting a class or from overriding a member, due to the reasons given in `msg`. The naming and placement of the methods is in line with @deprecated and @deprecatedName.
| * | Merge pull request #1275 from retronym/ticket/6276Grzegorz Kossakowski2012-09-115-2/+45
| |\ \ | | | | | | | | SI-6276 Warn on def or val that trivially loops infinitely
| | * | SI-6276 Warn on def or val that trivially loops infinitelyJason Zaugg2012-09-095-2/+45
| | |/
| * | Merge pull request #1168 from retronym/ticket/6258-2Josh Suereth2012-09-062-0/+41
| |\ \ | | | | | | | | SI-6258 Reject partial funs with undefined param types
| | * | SI-6258 Reject partial funs with undefined param typesJason Zaugg2012-08-232-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This regressed with virtpatmat. With -Xoldpatmat, pattern matching anonymous functions with an expected type of PartialFunction[A, B] are translated to a Function tree, and typed by typedFunction, which issues an error of the parameter types are not fully defined. This commit adds the same check to MatchFunTyper. It doesn't plug the hole in RefChecks#validateVariance (which is reminiscent of SI-3577.) Seems to me that in general one should handle: a) both BoundedWildcardType and WildcardType when in a place that can be called during inference, or b) neither otherwise
| * | | More fix for invalid companions.Paul Phillips2012-09-054-3/+14
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | Eliminated InvalidCompanions exception entirely. Anyone's guess why we unholstered this exception every time someone calls "isCodefinedWith" rather than when symbols are created. I moved the check into Namers, where it can be done once and with sufficient finesse not to crash so much. With this patch in place, "playbench" can be built with java7.
* / | restrict Deadline to finite durations (would have to throw otherwise)Roland2012-09-122-0/+23
|/ /