summaryrefslogtreecommitdiff
path: root/test/files/pos
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '2.10.x'Adriaan Moors2012-08-089-2/+59
|\ | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/ast/TreeGen.scala src/compiler/scala/tools/nsc/settings/AestheticSettings.scala
| * SI-6186 TypeTags no longer supported in macrosEugene Burmako2012-08-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original idea was to support both both TypeTags and ConcreteTypeTags as context bounds on macro implementations. Back then TypeTags were the implied default flavor of type tags. Basically because "TypeTag" is shorter than "ConcreteTypeTag" everyone jumped onto them and used them everywhere. That led to problems, because at that time TypeTags could reify unresolved type parameters ("unresolved" = not having TypeTag annotations for them). This led to a series of creepy errors, when one forgets to add a context bound in the middle of a chain of methods that all pass a type tag around, and then suddenly all the tags turn into pumpkins (because that unlucky method just reifies TypeRef(NoPrefix, <type parameter symbol>, Nil and passes it down the chain). Hence we decided to rename ConcreteTypeTag => TypeTag & TypeTag => AbsTypeTag, which makes a lot of sense from a reflection point of view. Unfortunately this broke macros (in a sense), because now everyone writes TypeTag context bounds on macro implementations, which breaks in trivial situations like: "def foo[T](x: T) = identity_macro(x)" (the type of x is not concrete, so macro expansion will emit an error when trying to materialize the corresponding TypeTag). Now we restore the broken balance by banning TypeTag from macro impls. This forces anyone to use AbsTypeTags, and if someone wants to check the input for presence of abstract types, it's possible to do that manually.
| * Merge pull request #1063 from VladUreche/issue/5788-quickJosh Suereth2012-08-071-0/+4
| |\ | | | | | | SI-5788 Tailcalls LabelDefs correctly duplicated
| | * SI-5788 Tailcalls LabelDefs correctly duplicatedVlad Ureche2012-08-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... in specialization. This is a quick hack to get SI-5788 fixed in 2.10.x. The full patch, which fixes the tailcalls LabelDefs will be merged into trunk, as it's too late for big changes. For reference, the complete fix is: e86afe65c8
| * | SI-6157 don't inline callee with exception-handler(s) if potentially unsafeMiguel Garcia2012-08-062-0/+26
| |/
| * Merge pull request #1023 from paulp/issue/6084Adriaan Moors2012-08-041-0/+15
| |\ | | | | | | Fix for SI-6084, type alias crasher.
| | * Fix for SI-6084, type alias crasher.Paul Phillips2012-07-301-0/+15
| | | | | | | | | | | | | | | | | | "no need for pt.normalize here, is done in erasure" ORLY? Review by @adriaanm.
| * | Merge pull request #982 from adriaanm/ticket-wolfcryJosh Suereth2012-08-034-0/+12
| |\ \ | | | | | | | | SI-5930 SI-5897 reduce redundant warnings in matches, fix flags usage
| | * | SI-5930 don't warn about dead code in jump to caseAdriaan Moors2012-07-242-0/+5
| | | |
| | * | SI-5897 don't check sensicality in matchAdriaan Moors2012-07-242-0/+7
| | | | | | | | | | | | | | | | | | | | the pattern matching analysis should be more precise anyway (don't warn twice)
* | | | Merge remote-tracking branch 'origin/2.10.x' into merge-2.10.xPaul Phillips2012-08-0210-22/+39
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/2.10.x: first stab at serialization of exprs and tags deploys a new starr that knows reify is a macro moves Expr from api to base evicts last traces of makro from our codebase reflect.makro => reflect.macros (Step I) removes -Xmacro-(.*)-classpath compiler options prepares our macro defs for refactoring (Step II) prepares our macro defs for refactoring (Step I) more refinements of reflection API SI-5888 Mirrors now have sane toStrings renames asType to toType and asXXXSymbol to asXXX miscellaneous refinements of reflection API navigation between fields and accessors moves most of symbol tests in API to descendants simplifies flag API SI-5732 members and derivatives now return Scope SI-5751 cleans up toolboxes for the release I actually managed to hit the limit of Scala signature annotation not fitting into a single string (high five everyone) and entered the undisovered region of arrEncode in GenASM. arrEncode returns Array[String] so asm.AnnotationWriter is not going to like it. Added more variants to achieve getLinkPos Checkfile update. Fixed maddening "..." lately in printed types. Removed resolveOverloaded SI-5866 Support casting null to value classes ClassTag.Nothing now throws an exception Fixed SI-5031. Only consider classes when looking for companion class. sym.effectiveOwner revealed this piece of inconsistency. companionModule is fine because similar check is there already. Fixed SI-5603. Early definitions now get transparent positions. This includes a fix for a minor problem described in #594 - ensureNonOverlapping still focuses on default position when outside of early defs. Review by @dragos, @odersky. SI-5799 Secondary constructors in value classes not allowed Closes SI-5878 Closes SI-5882 Closed 6029 ... New Worksheet mixing scheme Raw string interpolator Adds method askForResponse Disable interrupts during code instrumentation New Executor. SI-6142: warn @inline-methods ending up not inlined (rightfully or not) Avoids loading scala.package and scala.reflect.package from source if a classfile exists. `ScriptSourceFile` should not hard-code `OffsetPosition`. Fix `Instrumentation.getStatistics` method in partest. Instrument all classes in `instrumented` package. SI-5958 This deserves a stable type SI-6140 Scaladoc infinite recursion in wiki parser SI-4560 - improved test Revert "tentative fix for RC5 lift build problem." Revert "Closes #4560. Review by dragos." (introduction of safeREF) Revert fix part of "Closes 4560. Review by dragos." Fix SI-4560, NoSuchMethodErrors involving self types. SI-2038 make pt fully-defined when typing Typed Conflicts: src/compiler/scala/tools/nsc/interpreter/Imports.scala src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala src/compiler/scala/tools/nsc/interpreter/MemberHandlers.scala
| * | | evicts last traces of makro from our codebaseEugene Burmako2012-08-022-2/+2
| | | | | | | | | | | | | | | | Removes the stubs left out to appease the old starr, fixes macro tests.
| * | | Merge pull request #1016 from hubertp/2.10.x-issue/5031Josh Suereth2012-07-303-0/+14
| |\ \ \ | | | | | | | | | | Fixed SI-5031. Only consider classes when looking for companion class.
| | * | | Fixed SI-5031. Only consider classes when looking for companion class.Hubert Plociniczak2012-07-303-0/+14
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | sym.effectiveOwner revealed this piece of inconsistency. companionModule is fine because similar check is there already. Review by @paulp.
| * | | Merge pull request #981 from adriaanm/ticket-2038Josh Suereth2012-07-301-0/+5
| |\ \ \ | | |/ / | |/| | SI-2038 make pt fully-defined when typing Typed
| | * | SI-2038 make pt fully-defined when typing TypedAdriaan Moors2012-07-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dropExistential turns existentials in the expected type (pt) that's passed to `typed` into `BoundedWildcardType`s, but those should not end up in trees when typing a `Typed` node, we didn't check for the type being fully defined (`isFullyDefined`) (and thus did not make it fully defined by turning these BWTs into existentials again using `makeFullyDefined`)
| * | | Merge pull request #1002 from magarciaEPFL/fixes210Paul Phillips2012-07-282-20/+0
| |\ \ \ | | | | | | | | | | SI-6142: warn @inline-methods ending up not inlined (rightfully or not)
| | * | | SI-6142: warn @inline-methods ending up not inlined (rightfully or not)Miguel Garcia2012-07-262-20/+0
| | | | |
| * | | | Merge pull request #991 from adriaanm/ticket-5958Paul Phillips2012-07-281-0/+15
| |\ \ \ \ | | | | | | | | | | | | SI-5958 This deserves a stable type
| | * | | | SI-5958 This deserves a stable typeAdriaan Moors2012-07-261-0/+15
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `this` (or the self variable) passed as an actual argument to a method should receive a singleton type when computing the method's resultType this is necessary if the method's type depends on that argument
| * | | | Closed 6029 ...Martin Odersky2012-07-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | ... in a less nice way than I would like. Essentially, we mask type errors at later stages that arise from comparing existentials and skolems because we know that they are not tracked correctly through all tree transformations. Never mind that all these types are going erased anyway shortly afterwards. It does not smell nice. But as I write in the comment, maybe the best way out is to avoid skolems altogether. Such a change by far exceeds the scope of this pull request however.
* | | | | Merge pull request #1000 from paulp/topic/sealed-is-finalJosh Suereth2012-07-302-0/+15
|\ \ \ \ \ | | | | | | | | | | | | Refined isEffectivelyFinal logic for sealedness.
| * | | | | Refined isEffectivelyFinal logic for sealedness.Paul Phillips2012-07-262-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the enclosing class of a method is sealed and has only final subclasses, then the method is effectively final in the sealed class if none of the subclasses overrides it. This makes it possible to inline more methods without explicitly marking them final. Note that the test doesn't fail before this patch due to SI-6142, a bug in the optimizer, but here's a bytecode diff to prove it: @@ -16,8 +16,10 @@ public final class Test$ { Code: : getstatic // Field Foo$.MODULE$:LFoo$; : invokevirtual // Method Foo$.mkFoo:()LFoo; +: pop : bipush -: invokevirtual // Method Foo.bar:(I)I +: iconst_1 +: iadd : ireturn And the test in neg, which is manually made to fail due to the absence of inline warnings, correctly refuses to inline the methods. Review by @dragos.
* | | | | | Merge 2.10.xAdriaan Moors2012-07-285-0/+84
|\ \ \ \ \ \ | |/ / / / / |/| / / / / | |/ / / / | | | | | | | | | | | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala src/compiler/scala/tools/nsc/typechecker/Infer.scala test/files/neg/unchecked2.check
| * / / / Improve unchecked warnings a lot.Paul Phillips2012-07-272-0/+16
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't warn on "uncheckable" type patterns if they can be statically guaranteed, regardless of their runtime checkability. This covers patterns like Seq[Any] and lots more. Review by @adriaanm.
| * | | Merge pull request #966 from paulp/issue/6117Adriaan Moors2012-07-241-0/+19
| |\ \ \ | | |_|/ | |/| | SI-6117 regression involving import ambiguity.
| | * | Fix SI-6117, regression involving import ambiguity.Paul Phillips2012-07-211-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Today I learned that foo.member("bar") != foo.member("bar") if bar is overloaded, because each lookup of an overloaded member creates a new symbol (with equivalent OverloadedTypes.) How should symbols be compared so these do not appear unequal? Is there a method which unpacks the alternatives and compares them individually? It seems likely there are additional bugs which arise from not covering this case. Since this bug is in the context of importing, if the prefixes are identical then I can compare the names instead of the symbols and this issue goes away. But for the rest of the time during which one might encounter overloaded symbols, that would be a very lossy operation, since the overloaded symbol might be encoding any subset of the members with that name. There are lots of references to "OverloadedSymbol" in the comments of various methods in Types, but no such class is visible in the history. If we had such a thing, we could refine its equals method to recognize equivalent overloads. Review by @odersky.
| * | | Merge pull request #974 from adriaanm/repull-unchecked-hkAdriaan Moors2012-07-241-1/+1
| |\ \ \ | | |_|/ | |/| | Improve unchecked warnings.
| | * | Improve unchecked warnings.Paul Phillips2012-07-231-1/+1
| | | | | | | | | | | | | | | | | | | | Spurious test was not good. Better test avoids suppressing some legitimate warnings. Review by @moors.
| * | | SI-4881 infer variance from formals, then resultMartin Odersky2012-07-231-0/+31
| |/ / | | | | | | | | | | | | | | | | | | | | | Changed behavior so that when determining the target variance of a method parameter, the variance in formals comes first. If variance is still undecided by that, the variance in the result type is used as a secondary criterion. (This is also done when determining prototype type params.)
| * / SI-6089 test file for pt2Adriaan Moors2012-07-221-0/+18
| |/ | | | | | | test that matchEnd that's an argument of || that's in tail position is in tail position
* | Improve unchecked warnings.Paul Phillips2012-07-221-1/+1
| | | | | | | | | | Spurious test was not good. Better test avoids suppressing some legitimate warnings. Review by @moors.
* | Merge branch '2.10.x`Adriaan Moors2012-07-225-2/+38
|\| | | | | | | | | Conflicts: test/files/run/existentials-in-compiler.scala
| * Merge pull request #958 from adriaanm/ticket-1832Josh Suereth2012-07-211-0/+8
| |\ | | | | | | SI-1832 consistent symbols in casedef's pattern&body
| | * SI-1832 consistent symbols in casedef's pattern&bodyAdriaan Moors2012-07-201-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the only change to typedBind in this commit (beyond refactoring to keep my eyes from bleeding), is explained by the added comment: have to imperatively set the symbol for this bind to keep it in sync with the symbols used in the body of a case when type checking a case we imperatively update the symbols in the body of the case those symbols are bound by the symbols in the Binds in the pattern of the case, so, if we set the symbols in the case body, but not in the patterns, then re-type check the casedef (for a second try in typedApply for example -- SI-1832), we are no longer in sync: the body has symbols set that do not appear in the patterns since body1 is not necessarily equal to body, we must return a copied tree, but we must still mutate the original bind
| * | Merge pull request #948 from gkossakowski/target-1.6Lukas Rytz2012-07-201-2/+4
| |\ \ | | |/ | |/| Deprecate all JVM 1.5 targets and make 1.6 default.
| | * Deprecate all JVM 1.5 targets and make 1.6 default.Grzegorz Kossakowski2012-07-191-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a check if deprecated target is being used. I put that check into `checkDeprecatedSettings`. I tried to invent some general mechanism for deprecating choices in ChoiceSetting but I gave up eventually. It wasn't worth it the complexity. Also, with current approach I'm able to provide nice, customized deprecation warning. Make `jvm-1.6` a default backend. Altered test for SI-5957 because it crashes the backend. However, the problem is not with backend but with symbol creation. We get two different symbols with the same internal name and both are used in trees that reach GenASM. See SI-6109 for details. Review by @magarciaEPFL and @paulp.
| * | Merge pull request #923 from scalamacros/ticket/6047Adriaan Moors2012-07-192-0/+21
| |\ \ | | |/ | |/| test case closes SI-6047
| | * test case closes SI-6047Eugene Burmako2012-07-172-0/+21
| | | | | | | | | | | | The bug is not reproducible both in M4 and in M5.
| * | Merge pull request #909 from lrytz/t5892Adriaan Moors2012-07-181-0/+5
| |\ \ | | | | | | | | SI-5892 allow implicit views in annotation args
| | * | SI-5892 allow implicit views in annotation argsLukas Rytz2012-07-181-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the problem was that lazy annotations got completed in phase pickler. the `inferView` method in Typers bails out if `isPastTyper`. now the lazy annotations completes `atPhase(typerPhase)`. test case in `pos`. the second test case in `neg` is for another bug that is discussed in a comment of SI-5892. when type checking arguments of type parameter annotations, the class members should not be in scope. this was alreay fixed in 9129cfe9.
* | | | Merge branch '2.10.x'Adriaan Moors2012-07-1816-54/+7
|\| | |
| * | | Merge pull request #921 from adriaanm/ticket-spuriousnessAdriaan Moors2012-07-1814-54/+0
| |\ \ \ | | |_|/ | |/| | move test files that fail spuriously to pending
| | * | move test files that fail spuriously to pendingAdriaan Moors2012-07-1714-54/+0
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have this sneaky suspicion that part of these spurious failures are caused by the recent partest optimizations. @axel22 already checked that compiler instances are not shared between test runs. However, except for the benchmark test, they all have a distinct race condition in symbol loading/type checking feel to them. Since, in the end, the tests and/or their corresponding fixes are as likely a culprit as the test framework, moving them out of the way until their owners can get them back in line and they stop throwing primate wenches into our build. We should bring them back as soon as possible, though.
| * / SI-6028 Avoid needless symbol renaming in lambdalift.Jason Zaugg2012-07-142-0/+7
| |/ | | | | | | | | | | | | | | | | | | Preserve names of all referenced free vars. Only the proxy symbols have the fresh names. The resulting natural beauty is evident in the diff of t6028.check. This subsumes the treatment in 0e170e4b that ensured named parameter calls cannot see mangled names; pos/t6028 confirms as much.
* | Closes SI-6072, crasher with overloaded eq.Paul Phillips2012-07-161-0/+3
| | | | | | | | | | | | | | You don't want to do name-based selections in later phases if you can help it, because there is nobody left to resolve your overloads. If as in this example you're calling a known method, use the symbol. Review by @hubertp.
* | Moved two tests to preserve path uniqueness.Paul Phillips2012-07-132-0/+0
|/ | | | Can't have a pos/foo.scala and a pos/foo/ test simultaneously.
* SI-5957 enable direct parsing of nested java class classfileLukas Rytz2012-07-122-0/+17
| | | | by weakening an assertion. explained in the source comment.
* Merge pull request #874 from adriaanm/ticket-6022Adriaan Moors2012-07-112-0/+8
|\ | | | | SI-6022 model type-test-implication better
| * SI-6022 model type-test-implication betterAdriaan Moors2012-07-112-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | we use subtyping as a model for implication between instanceof tests i.e., when S <:< T we assume x.isInstanceOf[S] implies x.isInstanceOf[T] unfortunately this is not true in general. SI-6022 expects instanceOfTpImplies(ProductClass.tpe, AnyRefClass.tpe), but ProductClass.tpe <:< AnyRefClass.tpe does not hold because Product extends Any however, if x.isInstanceOf[Product] holds, so does x.isInstanceOf[AnyRef], and that's all we care about when modeling type tests