summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 2.10.1 into masterAdriaan Moors2013-02-278-0/+80
|\ | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/ast/Trees.scala src/library/scala/concurrent/impl/ExecutionContextImpl.scala
| * Merge 2.10.1 into 2.10.x.Adriaan Moors2013-02-279-55/+119
| |\
| | * Merge pull request #2160 from scalamacros/topic/7112-followup-2101v2.10.1-RC2Adriaan Moors2013-02-251-1/+1
| | |\ | | | | | | | | fixes the test for SI-7112
| | | * fixes the test for SI-7112Eugene Burmako2013-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Freshly released Java 1.6.0_41 for OSX fails with "IllegalAccessError: tried to access class JavaSimpleEnumeration_1 from class sun.proxy.$Proxy6", and rightfully so, because that class isn't public. I think I will avoid the usual "how could this even work before" in this commit message.
| | * | SI-7180 Fix regression in implicit scope of HK type alias.Jason Zaugg2013-02-251-0/+13
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | We actually need to call normalize here, otherwise we don't progress through #1 below. [infer implicit] scala.this.Predef.implicitly[Higher[Foo.Bar]] with pt=Higher[Foo.Bar] in object Foo 1. tp=Foo.Bar tp.normalize=[A <: <?>]Foo.Bar[A] tp.dealias=Foo.Bar 2. tp=Foo.Bar[A] tp.normalize=Box[A] tp.dealias=Box[A]
| | * Merge pull request #2152 from retronym/topic/annotatedRetyping-2.10.1Adriaan Moors2013-02-214-0/+82
| | |\ | | | | | | | | SI-7163 backport of annotated retyping to 2.10.1
| | | * Additional test case for Lukas' fix to annotated originals.Jason Zaugg2013-02-212-0/+14
| | | | | | | | | | | | | | | | | | | | This was inspired by the regression that Mark encountered when upgrading SBT from 2.10.0 to 2.10.1-RC1.
| | | * Fix typing idempotency bug with Annotated treesLukas Rytz2013-02-212-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | typedAnnotated transforms an Annotated tree into a Typed tree. The original field of the result is set to the Annotated tree. The bug was that typedAnnotated was using the untyped Annotated tree as original, but also set its type. When re-typing later on the same Annotated tree, the typer would consider it as alreadyTyped. This is incorrect, the typer needs to convert Annotated trees to Typed. Also, the Annotated tree only had its type field set, but its children were still untyped. This crashed the compiler lateron, non-typed trees would get out of the typing phase.
| | * | SI-7146 - Fixing checkinit bug in ExecutionContextImpl and adding testViktor Klang2013-02-192-0/+28
| | | |
| | * | SI-7128 Fix regression in copyToArray for empty arraysJason Zaugg2013-02-141-0/+3
| | |/
| | * [nomaster] Revert "SI-6548 reflection now correctly enters jinners"Adriaan Moors2013-02-104-40/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 54a84a36d5b435a787d93ca48d45399136c7e162. This is necessary to maintain binary compatibility with 2.10.0. run/t6989.check had to be updated as it also (indirectly) tested SI-6548 Conflicts: test/files/lib/javac-artifacts.jar.desired.sha1 test/files/run/t6548.check test/files/run/t6548/Test_2.scala
| | * [nomaster] Revert "SI-4664 Make scala.util.Random Serializable"Adriaan Moors2013-02-091-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Also revert "SI-4664 [Make scala.util.Random Serializable] Add test case" This reverts commit 0b92073a38f9d1823f051ac18173078bfcfafc8a. This reverts commit 2aa66bec86fd464712b0d15251cc400ff9d52821. This is necessary to maintain binary compatibility with 2.10.0.
| * | Merge pull request #2134 from scalamacros/topic/resetattrs-thisPaul Phillips2013-02-272-0/+12
| |\ \ | | | | | | | | resetAttrs now always erases This.tpe
| | * | resetAttrs now always erases This.tpeEugene Burmako2013-02-172-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The symbol of This, if it points to a package class, isn't touched, just as usual, so that our Select(Select(Select(...))) => This(...) optimization works fine with attr reset. However the tpe is now erased, so that subsequent reflective compilation doesn't spuriously fail when seeing that some subtrees of a tree being compiled are typed. Erasing the tpe doesn't pose even a tiniest problem, because, as it can be seen in typedThis, type is trivially reconstructed from the symbol.
| * | | Merge pull request #2149 from khernyo/issue/7074Grzegorz Kossakowski2013-02-252-0/+24
| |\ \ \ | | | | | | | | | | SI-7074 Fix xml attribute sorting
| | * | | SI-7074 Fix xml attribute sortingSzabolcs Berecz2013-02-242-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sorting the attributes of an xml element could drop some of the attributes. It was caused by the incorrect use of MetaData#copy() to concatenate "smaller" with the rest of the attributes. The MetaData#copy() method is similar to the following hypothetical method on a List: def copy(other: List): List = head :: other The fix prepends all elements of "smaller" to the rest of the attributes in the proper order.
| * | | | Merge pull request #2159 from scalamacros/topic/7112-followup-210xJames Iry2013-02-241-1/+1
| |\ \ \ \ | | | | | | | | | | | | fixes the test for SI-7112
| | * | | | fixes the test for SI-7112Eugene Burmako2013-02-231-1/+1
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Freshly released Java 1.6.0_41 for OSX fails with "IllegalAccessError: tried to access class JavaSimpleEnumeration_1 from class sun.proxy.$Proxy6", and rightfully so, because that class isn't public. I think I will avoid the usual "how could this even work before" in this commit message.
* | | | | Merge pull request #2170 from rkuhn/wip-duration-sleep-∂πJames Iry2013-02-261-2/+3
|\ \ \ \ \ | | | | | | | | | | | | relax time constraint in duration-tck.scala (for Windows)
| * | | | | relax time constraint in duration-tck.scala (for Windows VMs)Roland2013-02-261-2/+3
| | | | | |
* | | | | | Merge pull request #2169 from JamesIry/master_SI-7181Grzegorz Kossakowski2013-02-265-75/+226
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-7181 Eliminate unnecessary duplicates of finally blocks
| * | | | | | SI-7181 Eliminate unnecessary duplication of finally blocksJames Iry2013-02-263-75/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main body of a try and each exception handler were getting a copy of the finally block for the "normal" flow case (i.e. where they don't throw an uncaught exception or use "return" to exit early). But that's not necessary. With this commit the try body and each exception handler can all jump to the same copy of the finally block on a normal exit. A byte code test is included to ensure we're getting fewer copies of the finally block. inline-ex-handlers.check is updated because the icode is a bit different without the extra finally block copies.
| * | | | | | SI-7181 Prepare to remove duplicated finally blocksJames Iry2013-02-252-0/+101
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a first step towards fixing 7181, this commit improves the comments and variable names around generating try/catch/finally blocks in GenICode and adds a test verifying the current functionality of try/catch/finally blocks
* | | | | | SI-7006 Simplify jump-only block destination determinationJames Iry2013-02-252-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With proper reachability analysis, the code for finding the final destination of jump-only blocks was more complicated than needed. This commit simplifies and speeds up that process using a standard Tortoise and Hare algorithm on a Map from jump-only blocks to their immediate destinations. Test t7006 is increased a bit to make sure we don't get stuck on infinite loops and to make sure we're deleting all but the essential jump.
* | | | | | SI-7006 Eliminate unreachable blocksJames Iry2013-02-253-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GenASM was doing a bunch of stuff to eliminate unreachable exception handlers, but it was still leaving behind other unreachable blocks, for instance a finally block associated with an exception handler that got removed would still be left lying around. ASM would in turn turn those into a big pile of NOPs, which just take up space uselessly. This commit replaces all the logic for eliding exception handlers with a single unreachable block remover that catches unused exception handlers and a whole lot more.
* | | | | | SI-7006 Recognize more jump only blocksJames Iry2013-02-251-1/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During ASM code emission we would recognize a block that consisted of ICode-only artifacts (ENTER_SCOPE, EXIT_SCOPE, and LOAD_EXCEPTION) followed by a jump. But we weren't using the same logic to recognize all jump-only blocks. So jump-elision wasn't removing them. And that in fact was why the ASM code emission had to do its special case. This commit makes all jump-only block recognition use the same logic: a jump-only block is one that has 0 or more ICode-only instructions followed by a JUMP. It does't necessarily have to start with a JUMP. There's now a debugWarning if the old NOP emitting code is triggered and test t6102 is enhanced to error if that warning occurs.
* | | | | Merge pull request #2161 from scalamacros/topic/7112-followup-masterJames Iry2013-02-241-1/+1
|\ \ \ \ \ | | | | | | | | | | | | fixes the test for SI-7112
| * | | | | fixes the test for SI-7112Eugene Burmako2013-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Freshly released Java 1.6.0_41 for OSX fails with "IllegalAccessError: tried to access class JavaSimpleEnumeration_1 from class sun.proxy.$Proxy6", and rightfully so, because that class isn't public. I think I will avoid the usual "how could this even work before" in this commit message.
* | | | | | Merge pull request #2125 from retronym/ticket/7120Paul Phillips2013-02-236-0/+52
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-7120 Erasure must honor typeref prefixes
| * | | | | | SI-7120 Erasure must honor typeref prefixesJason Zaugg2013-02-146-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Erasure was discarding these, which led to unnecessarily wide types in quite particular circumstances. This showed up as a double definition error in the reported bug when the bridge method clashed with the erased signature.
* | | | | | | Merge remote-tracking branch 'origin/2.10.x' into masterPaul Phillips2013-02-237-0/+62
|\ \ \ \ \ \ \ | | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/2.10.x: SI-7171 Consider prefix when assessing type finality. please ant with filenames, add comments Fixed error in reflection API docs about linearization order on method baseClasses Shadowed Implict typo (fixes no issue) remove unused imports Conflicts: src/reflect/scala/reflect/internal/Types.scala
| * | | | | | SI-7171 Consider prefix when assessing type finality.Jason Zaugg2013-02-227-0/+67
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `Type#isFinalType` determines if a type could have a non-bottom subtype. This property is exploited by the pattern matcher to flag impossible patterns. This check was ignoring the type's prefix, and incorrectly deemed that `T#A` in `trait T { final class A }` was a final type. But it could have been subtyped by `U#A` where `U` <:< `T`, or, more simply, by `T.this.A`. Now, type finality requires that the prefix is stable. The existing test cases in neg/patmat-type-check.scala still correctly flag incompatiblities. `isFinalType` is also used by some code that massages pattern matches post specialization. That is actually either broken or obsolete under virtpatmat, I've opened SI-7172 to invesigate that. It is also used by GenICode to determine whether to emit the appropriate equality checks that are correct in the face of boxing. It is possible that this change will force the slow path in some rare cases, but it won't affect correctness.
* | | | | | Merge pull request #2147 from JamesIry/master_SI-7015Grzegorz Kossakowski2013-02-222-0/+60
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | SI-7015 Removes redundant aconst_null; pop; aconst_null creation
| * | | | | SI-7015 Cleanup from review of null duplicationJames Iry2013-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on feedback on https://github.com/scala/scala/pull/2147 * Assertion in GenICode#adaptNullRef reports the erroneous type * Test makes the Null type explicit for greater clarity
| * | | | | SI-7015 Removes redundant aconst_null; pop; aconst_null creationJames Iry2013-02-212-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In an effort to adapt methods and field accesses of type Null to other types, we were always emitting aconst_null pop aconst_null The problem is we were doing that even when the JVM was in a position to know it had null value, e.g. when the user had written a null constant. This commit fixes that and includes a test to show that the resulting byte code still works even without repeating ourselves and/or repeating ourselves. This commit also makes the scala.runtim.Null$ constructor private. It was a sealed abstract class which prevented subclassing in Scala, but it didn't prevent subclassing in Java. A private constructor takes care of that hole so now the only value of type Null$ should be null. Along the way I found some other questionable things in adapt and I've added TODO's and issue https://issues.scala-lang.org/browse/SI-7159 to track.
* | | | | | Merge pull request #2154 from ↵James Iry2013-02-222-4/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | viktorklang/wip-SI7164-nonfatal-notimplementederror SI-7164 - Removing NotImplementedError as Fatal from s.u.c.NonFatal
| * | | | | | SI-7164 - Removing NotImplementedError as Fatal from s.u.c.NonFatalViktor Klang2013-02-212-4/+4
| |/ / / / /
* | | | | | Merge pull request #2151 from adriaanm/merge-2.10.xPaul Phillips2013-02-2216-1344/+154
|\ \ \ \ \ \ | | | | | | | | | | | | | | Merge 2.10.x into master
| * \ \ \ \ \ Merge 2.10.x into master.Adriaan Moors2013-02-2016-1344/+154
| |\ \ \ \ \ \ | | |/ / / / / | |/| / / / / | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: build.number src/compiler/scala/tools/nsc/doc/base/MemberLookupBase.scala src/compiler/scala/tools/nsc/typechecker/Macros.scala test/files/presentation/doc/doc.scala
| | * | | | Merge pull request #2118 from lrytz/annotatedRetypingJames Iry2013-02-194-0/+82
| | |\ \ \ \ | | | | | | | | | | | | | | Fix typing idempotency bug with Annotated trees
| | | * | | | Additional test case for Lukas' fix to annotated originals.Jason Zaugg2013-02-182-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was inspired by the regression that Mark encountered when upgrading SBT from 2.10.0 to 2.10.1-RC1.
| | | * | | | Fix typing idempotency bug with Annotated treesLukas Rytz2013-02-122-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | typedAnnotated transforms an Annotated tree into a Typed tree. The original field of the result is set to the Annotated tree. The bug was that typedAnnotated was using the untyped Annotated tree as original, but also set its type. When re-typing later on the same Annotated tree, the typer would consider it as alreadyTyped. This is incorrect, the typer needs to convert Annotated trees to Typed. Also, the Annotated tree only had its type field set, but its children were still untyped. This crashed the compiler lateron, non-typed trees would get out of the typing phase.
| | * | | | | Merge pull request #2130 from vigdorchik/relax_docJames Iry2013-02-192-9/+7
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | SI-7134: don't require doc.Settings in base api of scaladoc.
| | | * | | | | SI-7134: don't require doc.Settings in base api of scaladoc.Eugene Vigdorchik2013-02-152-9/+7
| | | | |_|/ / | | | |/| | |
| | * | | | | Merge pull request #2137 from ↵James Iry2013-02-194-0/+26
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | huitseeker/issue/value-protected-in-inherited-1000567 SI-5013 / #1000567 : added presentation test for fixed bug
| | | * | | | | unit test ide-t1000567 exercises SI-5063, aka #1000567.François Garillot2013-02-194-0/+26
| | | | | | | |
| | * | | | | | Merge pull request #2135 from heathermiller/futures-cleanupsJames Iry2013-02-193-1331/+0
| | |\ \ \ \ \ \ | | | |/ / / / / | | |/| | | | | Removing disabled, unneeded futures tests
| | | * | | | | Removing disabled, unneeded futures testsHeather Miller2013-02-173-1331/+0
| | | | | | | |
| | * | | | | | SI-5744 evidence params are now SYNTHETICUladzimir Abramchuk2013-02-162-0/+28
| | | |/ / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The macro def <-> macro impl correspondence check compares names of the corresponding parameters in def and impl and reports an error if they don't match. This was originally designed to avoid confusion w.r.t named arguments (which ended up being never implemented as described in SI-5920). Sometimes parameter names are generated by the compiler, which puts the user in a tough position. Luckily, there's an escape hatch built it, which omits the name correspondence check if one of the parameters is SYNTHETIC. Everything went well until we realized that evidences generated by context bounds aren't SYNTHETIC, which led to the bug at hand. Marking auto-generated evidence parameters SYNTHETIC was only the first step, as the correspondence checker uses parameter symbols, not parameter trees. Why's that a problem? Because SYNTHETIC doesn't get propagated from def trees to their underlying symbols (see ValueParameterFlags). Unfortunately one cannot just change ValueParameterFlags, because that would break printouts generated in TypeDiagnostics, which is designed to not print synthetic symbols. Thus we modify methodTypeErrorString in TypeDiagnostics to always print synthetic symbols. Therefore now we propagate all paramSym.flags when doing correspondent sweeps to keep them in sync between def trees and their underlying symbols. This fixes the problem.
| | * | | | | Merge pull request #2115 from retronym/ticket/7091Adriaan Moors2013-02-121-0/+7
| | |\ \ \ \ \ | | | |_|/ / / | | |/| | | | SI-7091 Don't try to put a protected accessor in a package.