summaryrefslogtreecommitdiff
path: root/test/pending/neg
Commit message (Collapse)AuthorAgeFilesLines
* SI-5900 Fix pattern inference regressionJason Zaugg2014-02-121-0/+22
| | | | | | | | | | | | | | | | | | | | This commit does not close SI-5900. It only addresses a regression in 2.11 prereleases caused by SI-7886. The fix for SI-7886 was incomplete (as shown by the last commit) and incorrect (as shown by the regression in pos/t5900a.scala and the fact it ended up inferring type parameters.) I believe that the key to fixing this problem will be unifying the inference of case class constructor patterns and extractor patterns. I've explored that idea: https://gist.github.com/retronym/7704153 https://github.com/retronym/scala/compare/ticket/5900 But didn't quite get there.
* SI-5900 Pending test to show that SI-7886 persistsJason Zaugg2014-02-121-0/+23
| | | | | | | qbin/scalac test/pending/neg/t7886b.scala && qbin/scala Test java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at Test$$anon$1.accept(t7886b.scala:15) at Test$.g(t7886b.scala:9)
* Merge pull request #3355 from xeno-by/topic/saturday-nightJason Zaugg2014-01-141-2/+2
|\ | | | | reshuffles names for blackbox/whitebox contexts, changes bundle notation
| * *boxContext => *box.Context , *boxMacro => *box.MacroEugene Burmako2014-01-121-2/+2
| | | | | | | | | | | | | | | | | | | | Performs the following renamings: * scala.reflect.macros.BlackboxContext to scala.reflect.macros.blackbox.Context * scala.reflect.macros.BlackboxMacro to scala.reflect.macros.blackbox.Macro * scala.reflect.macros.WhiteboxContext to scala.reflect.macros.whitebox.Context * scala.reflect.macros.WhiteboxMacro to scala.reflect.macros.whitebox.Macro https://groups.google.com/forum/#!topic/scala-internals/MX40-dM28rk
* | SI-2066 Plug a soundness hole higher order type params, overridingJason Zaugg2013-11-271-16/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | | PolyType-s parameterized by higher order type parameters (HOTPs) should only be relatable with <:< or =:= if the variances of their type parameters line up. This is only enforced for HOTPs defined in method type arguments. Invariant type parameters subsume variant ones. Concretely, as described by @S11001001: > A method taking [F[_]] can implement a method taking [F[+_]]. > Likewise, a method taking [F[_[+_]]] can implement a method > taking [F[_[_]]], as with [F[_[_[_]]]] implementing [F[_[_[+_]]]], > and so on, the variance subsumption flipping at each step. > > This is just the opposite of the variance for passing type > parameters to either instantiate types or call methods; a F[+_] > is a suitable F[_]-argument, a F[_[_]] a suitable F[_[+_]]-argument, > and so on. > > All of the above rules can be duplicated for contravariant positions > by substituting - for +. Also, something similar happens for > weakening/strengthening bounds, I believe. These cases are tested in the `// okay` lines in `neg/t2066.scala`.
* SI-6680 unsoundness in gadt typing.Paul Phillips2013-10-014-46/+0
| | | | | | | Introduces -Xstrict-inference to deal with the significant gap between soundness and what presently compiles. I'm hopeful that it's TOO strict, because it finds e.g. 75 errors compiling immutable/IntMap.scala, but it might be that bad.
* Merge pull request #2859 from som-snytt/issue/7622-phaserGrzegorz Kossakowski2013-09-124-53/+0
|\ | | | | SI-7622 Clean Up Phase Assembly
| * SI-7622 Clean Up Phase AssemblySom Snytt2013-08-214-53/+0
| | | | | | | | | | | | | | | | Let optimiser components and continuations plugin opt-out when required flags are not set. Wasted time on a whitespace error in check file, so let --debug dump the processed check file and its diff.
* | Removing orphan check/flag files.Paul Phillips2013-08-292-0/+10
|/
* New tests for name-based pattern matcher.Paul Phillips2013-08-174-0/+46
|
* Merge branch 'pr/merge-2.10.2' into masterPaul Phillips2013-06-042-0/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pr/merge-2.10.2: SI-7375 ClassTag for value class aliases SI-7507 Fix lookup of private[this] member in presence of self type. SI-7532 Fix regression in Java inner classfile reader SI-7517 Fix higher kinded type inference regression SI-7516 Revert "SI-7234 Make named args play nice w. depmet types" A test case for a recent LUB progression. SI-7421 remove unneeded extra-attachement in maven deploy SI-7486 Regressions in implicit search. SI-7509 Avoid crasher as erronous args flow through NamesDefaults SI-6138 Centralize and refine detection of `getClass` calls SI-7497 Fix scala.util.Properties.isMac SI-7473 Bad for expr crashes postfix Increase build.number to 2.10.3 SI-7391 Always use ForkJoin in Scala actors on ... ... Java 6 and above (except when the porperty actors.enableForkJoin says otherwise) Reimplementing much of the DefaultPromise methods Optimizations: 1) Avoiding to call 'synchronized' in tryComplete and in tryAwait 2) Implementing blocking by using an optimized latch so no blocking ops for non-blockers 3) Reducing method size of isCompleted to be cheaper to inline 4) 'result' to use Try.get instead of patmat c.typeCheck(silent = true) now suppresses ambiguous errors Conflicts: bincompat-backward.whitelist.conf bincompat-forward.whitelist.conf src/compiler/scala/reflect/macros/contexts/Typers.scala src/compiler/scala/reflect/reify/package.scala src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala src/compiler/scala/tools/reflect/ToolBoxFactory.scala src/library/scala/concurrent/impl/Promise.scala src/reflect/scala/reflect/internal/Types.scala
| * SI-7486 Regressions in implicit search.Paul Phillips2013-05-232-0/+13
| | | | | | | | Revert e86832d7e8 and dd33e280e2.
| * [nomaster] temporarily breaks SI-5353Eugene Burmako2013-05-112-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The subsequent fix to SI-5923 unmasks the fact that SI-5353 has not been fixed - it's just that one of its manifestation got hidden behing SI-5923. In fact, if in the code snippet from the bug report we change Array() to Array[Nothing](), things will start crashing as usual. The problem we have here is that arrays of nothings and nulls are very weird in a sense that their compile-time representations (types) and their runtime representations (JVM arrays of Object) behave differently with respect to subtyping. Due to an unlucky coincidence SI-5923 prevented some of the arrays of nothing from being compilable, so the problem was well hidden until now. A principled approach to handling the situation we have here would be to fix SI-5353 (we already know how to do that: https://github.com/scala/scala/pull/2486) and to disallow arrays of nothings and nulls as suggested in SI-7453. Unfortunately, both fixes are going to bring incompatibilities, which are not acceptable in a minor release (this pull request targets 2.10.x). Therefore we decided to turn a blind eye on the iceberg and just fix a tip of it by emulating the portion of SI-5923 that used to mask SI-5353, retaining perfect backward compatibility. Unfortunately, it's not that easy. Apparently one cannot simply report all the occurrences of Array() as errors, because if we know expected type of that expression, then everything's fine - the expected type will drive type inference and the dreaded Array[Nothing]() will not arise. All right, so let's just check whether pt == WildcardType and then report errors. However that's still not enough because of SI-3859. Having my hack failing for the third time, made me stop for a second and think whether it's worth to play with fire and introduce potential breakages for the sake of preventing a quite unlikely bug from happening. I don't think the it's okay to risk here, therefore I just disable the failing test, especially because we already have a working fix to SI-5353 submitted to master, so it's not like we're deferring the work to be done to a random point in unclear future. NOTE: That's only a temporary hack targeted at 2.10.x. There's no reason for this code to be merged into master, because master is soon going to have a principled solution to the problem: https://github.com/scala/scala/pull/2486.
| * Merge pull request #2000 from adriaanm/backport-pr-1873Paul Phillips2013-01-311-19/+0
| |\ | | | | | | [backport] SI-5378, unsoundness with type bounds in refinements.
| | * [backport] SI-5378, unsoundness with type bounds in refinements.Paul Phillips2013-01-281-19/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the comment says: Not enough to look for abstract types; have to recursively check the bounds of each abstract type for more abstract types. Almost certainly there are other exploitable type soundness bugs which can be seen by bounding a type parameter by an abstract type which itself is bounded by an abstract type. SPECIAL: BUY ONE UNSOUNDNESS, GET ONE FREE In refinement types, only the first parameter list of methods was being analyzed for unsound uses of abstract types. Second parameter list and beyond had free unsoundness reign. That bug as well is fixed here.
* | | Revert "SI-7517 type constructors too eagerly normalized."Paul Phillips2013-06-031-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 14534c693d2eb6acafaf8244c14b5643388fbd67. It turns out this approach was breaking the working variations in the submitted test case even as it was unbreaking the unworking one, but I never managed to uncomment them. Fortunately retronym's test case was not so lackadaisical.
* | | SI-7517 type constructors too eagerly normalized.Paul Phillips2013-05-311-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I think 403eadd0f1 was largely a symptomatic remedy (not that we shouldn't harden against such outcomes) and that this commit gets closer to the root causes. The unanticipated change to test/files/run/t6113.check is like a cry of support from the jury box. -Foo[[X](Int, X)] +Foo[AnyRef{type l[X] = (Int, X)}#l] We should continue to look at calls to normalize with grave suspicion.
* | | SI-7494 Tests for status quoSom Snytt2013-05-1944-323/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Exploit SI-6446 fix to move old pending tests for plugins to the active pool. Also, nuance the partest runner to allow the compiler to crash with a FatalError if a check file is present. Some of the plugin tests make phase assembly throw. One of the legacy tests was moved back to pending: There seems to be a race for who shall be deemed truly dependent. Back to pending for you! apm@mara:~/projects/snytt/test$ ./partest files/neg/t7494-cyclic-dependency/ Selected 1 tests drawn from specified tests > starting 1 test in neg ok 1 - neg/t7494-cyclic-dependency 1/1 passed (elapsed time: 00:00:04) Test Run PASSED apm@mara:~/projects/snytt/test$ ./partest files/neg/t7494-cyclic-dependency/ Selected 1 tests drawn from specified tests > starting 1 test in neg !! 1 - neg/t7494-cyclic-dependency [output differs] > 0/1 passed, 1 failed in neg >>>>> Transcripts from failed tests >>>>> > partest files/neg/t7494-cyclic-dependency % scalac t7494-cyclic-dependency/ThePlugin.scala % scalac t7494-cyclic-dependency/sample_2.scala error: Cycle in compiler phase dependencies detected, phase cyclicdependency1 reacted twice! % diff files/neg/t7494-cyclic-dependency-neg.log files/neg/t7494-cyclic-dependency.check @@ -1 +1 @@ -error: Cycle in compiler phase dependencies detected, phase cyclicdependency1 reacted twice! +error: Cycle in compiler phase dependencies detected, phase cyclicdependency2 reacted twice! 0/1 passed, 1 failed (elapsed time: 00:00:04) Test Run FAILED
* | | Merge commit '644eb7078a' into wip/fresh-merge2Paul Phillips2013-02-013-0/+56
|\| | | | | | | | | | | | | | | | | Conflicts: build.xml src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
| * | SI-6968 Simple Tuple patterns aren't irrefutableJason Zaugg2013-01-273-0/+56
| |/ | | | | | | | | | | | | | | | | | | | | | | Reverts part of c82ecab. The parser can't assume that a pattern `(a, b)` will match, as results of `.isInstanceOf[Tuple2]` can't be statically known until after the typer. The reopens SI-1336, SI-5589 and SI-4574, in exchange for fixing this regression SI-6968. Keeping all of those fixed will require a better definition of irrefutability, and some acrobatics to ensure safe passage to the ambiguous trees through typechecking.
* / SI-5378, unsoundness with type bounds in refinements.Paul Phillips2013-01-091-19/+0
|/ | | | | | | | | | | | | | | | | As the comment says: Not enough to look for abstract types; have to recursively check the bounds of each abstract type for more abstract types. Almost certainly there are other exploitable type soundness bugs which can be seen by bounding a type parameter by an abstract type which itself is bounded by an abstract type. SPECIAL: BUY ONE UNSOUNDNESS, GET ONE FREE In refinement types, only the first parameter list of methods was being analyzed for unsound uses of abstract types. Second parameter list and beyond had free unsoundness reign. That bug as well is fixed here.
* Normalized line endings.Paul Phillips2012-09-202-8/+8
| | | | | | This brings all the files into line with the .gitattributes settings, which should henceforth be automatically maintained by git.
* SI-6342 cleans up toolbox APIEugene Burmako2012-09-151-1/+1
| | | | | | 1) parseExpr => parse 2) runExpr => eval 3) Introduces compile(Tree): () => Any, since it has frequent uses
* cleanup for macroExpandEugene Burmako2012-08-184-0/+18
| | | | | | | | | | | | | Error reporting is moved to ContextErrors to disentangle stuff in Macros.scala. With logics and error reporting intertwined it was an awful mess. Exceptions are used for the same reason. Instead of threading failures through the code polluting it with options/ifs, I outline the success path. It worked much better for typedMacroBody, but I'm also happy with the resulting code of macroExpand. To me a major factor towards applicability of exceptions was that they are short-lived and that there might be max one error per domain, after which we unconditionally bail.
* repairs the tests after the refactoring spreeEugene Burmako2012-06-081-2/+7
|
* Pending and passing tests.Paul Phillips2012-05-232-26/+165
| | | | | | | | Move now-passing SI-963 test into neg. Test for partial specialization. Pending test for SI-5008. Pending test for SI-4649. Abstract array type test.
* Removing redunant/passing tests from pending.Paul Phillips2012-05-101-20/+0
|
* Test case for SI-5378phaller2012-05-081-0/+19
|
* Test case for SI-2066Heather Miller2012-05-071-0/+16
|
* Test case for SI-1557Heather Miller2012-05-061-0/+18
|
* Moved passing tests from pending to files.Paul Phillips2012-05-032-15/+0
| | | | | | | | 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.
* Test case for si-5618.Aleksandar Prokopec2012-05-022-0/+34
|
* SI-5702 Pattern parser halts on starSom Snytt2012-04-262-10/+0
| | | | | | | | | | | | | | 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."
* Next generation of macrosEugene Burmako2012-04-122-0/+14
| | | | | | | | | | | | | | | | | | | | | | Implements SIP 16: Self-cleaning macros: http://bit.ly/wjjXTZ Features: * Macro defs * Reification * Type tags * Manifests aliased to type tags * Extended reflection API * Several hundred tests * 1111 changed files Not yet implemented: * Reification of refined types * Expr.value splicing * Named and default macro expansions * Intricacies of interaction between macros and implicits * Emission of debug information for macros (compliant with JSR-45) Dedicated to Yuri Alekseyevich Gagarin
* Begone t1737...Hubert Plociniczak2011-11-0213-36/+36
|
* Renamed tests named bugXXX to tXXX, no review.Paul Phillips2011-08-245-11/+11
|
* Attacked classpaths to get "." off of it when i...Paul Phillips2011-08-063-0/+7
| | | | | | | | | | | | | Attacked classpaths to get "." off of it when it's not actually specified. The commit makes me nervous, but there's no invisible way to fix something like this. ** Attention, this commit changes classpath handling ** We desperately need some way of testing that the classpath has certain qualities and does not have others; partest is not that way. Closes SI-4857, no review.
* Fixes underlying "...Martin Odersky2011-03-051-0/+8
|
* Moved and removed a bunch of tests from pending.Paul Phillips2011-01-191-0/+20
|
* Some work on error messages, somewhat based on ...Paul Phillips2010-11-261-0/+11
| | | | | | Some work on error messages, somewhat based on ideas in #3092. No review.
* A modifier's work is never done.Paul Phillips2010-10-261-5/+0
| | | | | | | protected and its bevy of corner cases. Closes #3939, #3947. This patch is intended for both trunk and 2.8.1. Already reviewed and co-authored by moors, and review by oderksy.
* oh well.. so let's remove that test. no review.Lukas Rytz2010-10-212-0/+15
|
* One last batch of test cleanups and I think I'l...Paul Phillips2010-10-0314-118/+27
| | | | | | | One last batch of test cleanups and I think I'll call it a day. If you're worried I didn't leave any for anyone else, let me put your fears to rest. PLENTY left to sift through. No review.
* The next batch of tests put up a little more st...Paul Phillips2010-10-023-69/+0
| | | | | | | | | | | | | | The next batch of tests put up a little more struggle, but only a little. See test/pending/pos/unappgadteval.scala (the changes for which were in the previous commit) for an example of a test which might be on to something. Any idea what it would take to get it working? // the key lines case i @ Suc() => { (y: Int) => y + 1 } // a = Int => Int case f @ Lam[b,c](x, e) => { (y: b) => eval(e, env.extend(x, y)) } // a = b=>c No review.
* Sorting through the tests in pending from oldes...Paul Phillips2010-10-021-10/+10
| | | | | | | | | | | | | | | | | Sorting through the tests in pending from oldest to newest because I don't believe in having useless appendages. The verdict on the oldest fifteen tests is: 15/15 are fixed. Many were already in files under a different name. I moved a few and deleted the rest. Fun fact of the day: apparently there was a time when to call into java varargs with no arguments you might have to write something like: getClass().getMethod("getCount", Array[java.lang.Class[T] forSome { type T }]()) On this basis I retract any complaints I've ever had about anything. There is one question mark outlined in pos/testCoercionThis.scala, a file formerly called pos/moors.scala and therefore... review by moors.
* Cleaning up the contents of test.Paul Phillips2010-09-281-25/+0
| | | | | | | | | | | including "CheckEither", written against scalacheck 1.2 in the year 471 AD. Removed all the duplicates I could find, mostly between pending and files. Renamed a bunch of tests so they wouldn't look like likely duplicates next time around. Nominated somebody else to do this once in a while. No review.
* pending test for #3663Lukas Rytz2010-08-062-0/+28
|
* Reverts r21973, the patch I characterized as "h...Paul Phillips2010-06-042-0/+10
| | | | | | | Reverts r21973, the patch I characterized as "hacky but no-risk" in my commit message, for causing #3480. Closes #3480. I'd say no review but who can trust a guy who throws around "no risk" with such abandon.
* If I work on this patch any longer without chec...Paul Phillips2010-04-051-0/+7
| | | | | | | | | | | | | | | | If I work on this patch any longer without checking in I will go stark raving mad. It is broken up into a couple pieces. This one is the changes to test/. It includes fixing a bunch of tests, removing deprecated constructs, moving jars used by tests to the most specific plausible location rather than having all jars on the classpath of all tests, and some filesystem layout change (continuations get their whole own srcpath.) This would be the world's most tedious review, so let's say no review. [Note: after this commit, I doubt things will build very smoothly until the rest of the partest changes follow. Which should only be seconds, but just in case.]
* Moved plugin neg tests to pending. No review.Philipp Haller2010-01-0542-0/+368
|