summaryrefslogtreecommitdiff
path: root/test/files/neg
Commit message (Collapse)AuthorAgeFilesLines
* SI-2405 Confer implicit privileges to renamed imports.Jason Zaugg2012-05-222-0/+18
| | | | | | | | | | | | | | | | | | | | Yin and yang would be pleased: A fix in two parts. 1. Use the name of the imported symbol, rather than the alias, in the generated `Select(qual, name)` tree. 2. Do the opposite in `isQualifyingImplicit`, which performs one part of the shadowing check. But there is still work to do. The second part of the shadowing check, `nonImplicitSynonymInScope`, fails to notice this case (irrespective of aliased imports). // Expecting shadowing #2. Alas, none is cast! object Test1 { object A { implicit val x: Int = 1 } import A.x def x: Int = 0 implicitly[Int] } I'm hitching the residual problem to SI-4270's wagon.
* SI-5760: Improve error message for package$Klass conflict with KlassSom Snytt2012-05-203-0/+26
| | | | | | | | | | | | Added a clarification to DoubleDefError for when the previous symbol was in the package object but current symbol is not. This was actually supposed to be an opportunity to hack partest to run the two-step failing compilation, but somebody beat me to it and my rebase failed. The next hacking opportunity might be to add .pt script files! The possibilities are endless.
* Merge pull request #578 from lrytz/wip/t5044-squashedAdriaan Moors2012-05-193-1/+23
|\ | | | | fix SI-5044: better error message on cyclic error and named/default args
| * better feedback for SI-5044Lukas Rytz2012-05-183-1/+23
| |
* | Merge pull request #577 from lrytz/wip/t2488Adriaan Moors2012-05-192-0/+43
|\ \ | | | | | | Fix SI-2488: allow named arg, in original position, before positionals
| * | Fix SI-2488Lukas Rytz2012-05-182-0/+43
| | |
* | | Merge pull request #568 from hubertp/issue/5801Adriaan Moors2012-05-192-0/+38
|\ \ \ | | | | | | | | Fix SI-5801: error messages regression.
| * | | Fixes SI-5801, error messages regression. Review by @adriaanmHubert Plociniczak2012-05-182-0/+38
| | | |
* | | | Fix SI-5544Lukas Rytz2012-05-183-0/+15
| |/ / |/| | | | | | | | Type-check annotations in a context with a localDummy owner
* | | Merge pull request #566 from lrytz/wip/t4928Adriaan Moors2012-05-183-6/+15
|\ \ \ | | | | | | | | Fix SI-4928
| * | | Fix SI-4928Lukas Rytz2012-05-163-6/+15
| | |/ | |/| | | | | | | better error message when a parameter is first defined positionally, then with a named argument.
* / | A band-aid solution for SI-5803.Jason Zaugg2012-05-172-0/+8
|/ / | | | | | | | | | | | | | | Since ae5ff662, resetAttrs duplicates trees, which doesn't preserve ApplyConstructor. My attempt to modify TreeCopier to do so proved trickier than expected. In any case, ApplyConstructor is not long for this world, and is only used in tree printing to distinguish `new X` from regular Apply trees, so this should suffice pending full surgery.
* | Debugging output tweaks.Paul Phillips2012-05-141-1/+1
| | | | | | | | And undeprecated Positional.
* | Forbid forward refs from self constructor invocations.Jason Zaugg2012-05-112-0/+35
| | | | | | | | | | | | | | Prevents the wheels falling off during later compiler phases, or, worse, during bytecode verification. Closes SI-4098.
* | Fixes SI-5564.Aleksandar Prokopec2012-05-082-0/+13
|/ | | | Catching typer errors in specialization.
*-. Merge commit 'refs/pull/486/head'; commit 'refs/pull/487/head'; commit ↵Paul Phillips2012-05-071-4/+4
|\ \ | | | | | | | | | 'refs/pull/488/head'; commit 'refs/pull/489/head'; commit 'refs/pull/490/head' into develop
| | * minor tag-related fixesEugene Burmako2012-05-071-4/+4
| |/
| |
| \
| \
| \
*---. \ Merge commit 'refs/pull/479/head'; commit 'refs/pull/480/head'; commit ↵Paul Phillips2012-05-062-0/+17
|\ \ \ \ | | | |/ | | |/| | | | | 'refs/pull/481/head'; commit 'refs/pull/482/head'; commit 'refs/pull/483/head'; commit 'refs/pull/484/head'; commit 'refs/pull/485/head' into develop
| * / | Test case closes SI-4568.Jason Zaugg2012-05-062-0/+17
| |/ / | | | | | | | | | What's the opposite of regression? Progression!
* / / Test that primitive arrays aren't accepted as a Java generic array.Jason Zaugg2012-05-066-0/+52
|/ / | | | | | | | | | | | | | | They exercise both joint and separate compilation. This resolves SI-750 (which was somewhat unfairly merged with another ticket). The error message itself could do with refinement: in particular instance of the much beloved: found X, required X.
* | A couple checkfile updates which snuck by.Paul Phillips2012-05-041-1/+3
| |
* | Updated Symbol to record classfile origin.Paul Phillips2012-05-0415-17/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change should be transparent to anything using sourceFile, unless it was drinking from the inheritance well too deeply. Rather than squander the already allocated field for every ClassSymbol not being compiled from source, I'm now populating it with the file representing the class. This will make a broad range of things easier, like debugging, issuing useful error messages, symbol invalidation, signature verification, you name it. def sourceFile - still returns only source code files def binaryFile - returns only class files def associatedFile - returns whatever is there, if anything Performance: I may be mistaken, but I believe this is a zero-impact change. No new fields are allocated; fields which were null now hold a useful reference. The reference is to a file instance which was already being allocated and already long-lived. Compare error messages: // Version 1 % scalac a.scala error: type _$1 is defined twice // Version 2 % scalac a.scala error: type _$1 is defined twice conflicting symbols both originated in file './foo/package.class' Note: this may be due to a bug in the compiler involving wildcards in package objects one error found Bonus for people who read commit logs. Try this in the repl after starting power mode. ListClass.info.members groupBy (_.associatedFile) foreach { case (k, vs) => println("%s\n %s\n".format(k, vs map (_.defString) mkString "\n ")) }
* | Fix for one of the oldest open soundness bugs.Paul Phillips2012-05-043-4/+34
|/ | | | | | | | | | | | | | | | | | | Closes SI-963, since it was one of my random 30 it won the prize. The trick after adding the stability check (which has been sitting there commented out for 3+ years) was that implicit search depended on the wrongness, because memberWildcardType would create scopes with members of the form ?{ val name: tp } And since a def shouldn't match that, fixing it broke everything until I flipped it around: memberWildcardType should be seeking ?{ def name: tp } It could also search for a mutable value: the relevant quality is that it not be stable so it doesn't have a tighter type than the members it hopes to match.
* Test case for SI-5106.Paul Phillips2012-05-032-0/+16
|
* Moved passing tests from pending to files.Paul Phillips2012-05-032-0/+15
| | | | | | | | Most are pattern matcher bugs fixed by virtpatmat. A few are reifier, package object, or miscellaneous. I threw in an original test for SI-2337, to go with those for SI-1697, SI-3705, SI-4415, and SI-1357, all of which (in the interests of making sure this basket has all the eggs) I am closing.
* Hardening implicit classes.Paul Phillips2012-05-032-0/+11
| | | | Closes SI-5728.
* Moved a warning behind -Xlint.Paul Phillips2012-05-031-1/+1
| | | | | | Eventually "-Xlint would have told you not to do that" will be a catchphrase, like "I love it when a plan comes together" or "respect mah authoritah."
* SI-5703: normalize refined types moreAdriaan Moors2012-05-031-1/+1
| | | | | | | | | to improve Array[T] java-interop with T[], normalize Object with Object{} to Object fix #SI-5688 by flattening refined types in parents updated check files to reflect flattening of refined types and updated position for refined types
* moving patmat to its own phaseAdriaan Moors2012-05-028-39/+9
| | | | | | | | | | | | | | | | | | | | sort field accessors, necessary after typers -- apparently... don't throw TypeError, use issueTypeError don't run patmat phase when -Xoldpatmat only virtualize matches when -Xexperimental recycle cps type of match for re-typechecking: when one of the internal cps-type-state annotations is present, strip all CPS annotations a cps-type-state-annotated type makes no sense as an expected type (matchX.tpe is used as pt in translateMatch) don't synth FunctionN impls during typer, only do this for PartialFunction updated check now function synth for match is deferred until uncurry patmat-transform try/catch with match in cps cleanup in selective anf remove TODO: can there be cases that are not CaseDefs -- nope
* Hackaround for people who like to instantiate the uninstantiable.Paul Phillips2012-05-011-1/+28
| | | | | | Closes SI-5666 again. (I don't have the least clue how I'm supposed to issue the error.)
* Fixes #SI-5578.Paul Phillips2012-05-012-0/+43
| | | | | | | | ResetAttrs shouldn't be side-effecting on the original tree, since it can lead to NPEs in erroneous trees (or maybe even for valid ones?). Review by @odersky (Patch by plocinic, applied without his complicity by extempore)
* Optimization of Predef implicits.Paul Phillips2012-04-301-2/+2
| | | | | | | All those wildcards in a default-scoped implicit are expensive, they each lead to a typevar on every search. Restructured the Tuple2/Tuple3 Zipped classes, they're better this way anyway. This also gets all that Tuple[23] code out of genprod.
* Removed a few more @deprecated members.Paul Phillips2012-04-284-9/+9
| | | | | The ones which remain I'm not removing on purpose, as I know from experience it's more trouble than it's yet worth.
* Revert "Moved ancillary methods off specialized traits."Paul Phillips2012-04-272-7/+7
| | | | | | This reverts commit 1d0372f84f9a7325a47beb55169cc454895ef74b. I forgot about polymorphic dispatch. Have to seek another way.
* Merge commit 'refs/pull/443/head'; commit 'refs/pull/444/head' into developPaul Phillips2012-04-2614-19/+179
|\
| * SI-5702 Pattern parser halts on starSom Snytt2012-04-2614-19/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In patterns, the parser halts when it sees stars. This means it does not handle infix notation for a case class named "*". This patch uses lookahead to decide whether to parse '_' '*' as a sequence pattern or as the start of infix. (For both normal and error cases, the tokens are always consumed immediately.) Error messages are improved for _* (as a help to learners) and slightly improved recovery helps the parse continue. The entry point for XML patterns is now distinct; otherwise, the change is local to pattern3-simplepattern; the entry point for simplepattern() is unchanged because it is commented "hook for IDE."
* | removes Expr <-> Tree implicitsEugene Burmako2012-04-254-9/+8
| |
* | Moved ancillary methods off specialized traits.Paul Phillips2012-04-242-7/+7
| | | | | | | | | | | | | | Moved compose/andThen off Function1, curried/tupled off Function2. Pushed Tuple2 zipped into auxiliary class. Created implicits to plaster over the changes. This drops several hundred classfiles and takes (unoptimized) scala-library.jar from 7.8 Mb to 7.4 Mb.
* | Update checkfile with more backticks.Paul Phillips2012-04-241-1/+1
| |
* | interop between manifests and tagsEugene Burmako2012-04-2312-0/+89
| |
* | resurrects manifests in their pre-2.10 gloryEugene Burmako2012-04-237-0/+84
| |
* | migrates stdlib and compiler to tagsEugene Burmako2012-04-239-32/+18
| | | | | | | | | | * all usages of ClassManifest and Manifest are replaced with tags * all manifest tests are replaced with tag tests
* | rethinks tagsEugene Burmako2012-04-237-17/+24
| | | | | | | | | | * introduces ArrayTag and ErasureTag * all type tags now feature erasure
* | fixes SI-5689Eugene Burmako2012-04-213-0/+14
|/
* One more checkfile update.Paul Phillips2012-04-161-1/+1
|
* Merge commit 'refs/pull/408/head'Paul Phillips2012-04-161-2/+2
|\
| * restore typedMatchAnonFun in all its gloryAdriaan Moors2012-04-141-2/+2
| | | | | | | | | | | | | | | | | | detect partialfunction in cpsannotationchecker emit apply/isDefinedAt if PF has @cps targs (applyOrElse can't be typed) further hacky improvements to selective anf better try/catch support in selective cps using freshly minted anonfun match make virtpatmat resilient to scaladoc (after uncurry, don't translate matches TODO: factor out translation all together so presentation compiler/scaladoc can skip it)
* | Fix for test checkfile.Paul Phillips2012-04-151-29/+2
| |
* | Merge commit 'refs/pull/401/head'; commit 'refs/pull/402/head'; commit ↵Paul Phillips2012-04-142-19/+0
|\ \ | |/ |/| | | 'refs/pull/403/head'; commit 'refs/pull/404/head'; commit 'refs/pull/405/head' into develop
| * implements reification of tough typesEugene Burmako2012-04-142-19/+0
| |