summaryrefslogtreecommitdiff
path: root/test/files/pos
Commit message (Collapse)AuthorAgeFilesLines
* Another existential problem down.Paul Phillips2012-02-112-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a window of danger when multiple related elements are being typed where something which is conceptually one thing can slip into two things, and those two things can be incompatible with one another. Less mysteriously, c478eb770d fixed this: def f = { object Bob ; Bob } ; val g = f But, it did not fix this: def f = { case class Bob() ; Bob } ; val g = f See test case pos/existentials-harmful.scala for an "in the wild" code example fixed by this commit. The root of the problem was that the getter and the field would each independently derive the same existential type to describe Bob, but those existentials were not the same as one another. This has been the most elusive bug I have ever fixed. I want to cry when I think of how much time I've put into it over the past half decade or so. Unfortunately the way the repl works it is particularly good at eliciting those grotesque found/required error messages and so I was never able to let the thing go. There is still a cosmetic issue (from the last commit really) where compound types wind up with repeated parents. Closes SI-1195, SI-1201.
* Replaced LiftCode with a function in MacroContextEugene Burmako2012-02-052-4/+4
| | | | | | | | | | | | | | Major cleanup of reification: * LiftCode phase has been removed * Code has been deprecated and will be removed as we roll a new starr * Logic related to type-directed lifting has been purged scala.reflect.macro.Context#reify now provides the same services as LiftCode provided (except that it returns Tree, not Code). For testing purposes, I've retained the oh-so-convenient automagic lift. test/files/codelib/code.jar now hosts Code.lift reimplemented in a macro, so that the tests can continue working as if nothing has happened.
* Closes #4336.Hubert Plociniczak2012-01-301-0/+19
| | | | Some of the type params might already be instantiated if explicit type application is done. Review by @adriaanm
* Bonus test case for SI-3999.Paul Phillips2012-01-281-0/+20
|
* Fix for recently induced -optimise crasher.Paul Phillips2012-01-262-0/+19
| | | | | | "Induced" but not in my estimation "caused". Would like to understand why the enclosed test case crashes under -optimise without this change to AddInterfaces.
* Merge remote-tracking branches 'retronym/ticket/5072' and ↵Paul Phillips2012-01-211-0/+26
|\ | | | | | | 'odersky/topic/t5120' into develop
| * Fix for problem in SBT that was caused by the too severe fix of type ↵Martin Odersky2012-01-211-0/+26
| | | | | | | | soundness problem t5120.
* | Test case for already closed SI-4176.Paul Phillips2012-01-201-0/+6
| |
* | Quick fix for one of the macro testsEugene Burmako2012-01-201-4/+2
| |
* | Progress with macrosEugene Burmako2012-01-201-1/+1
|/ | | | | | | | | | | | A short recap: * Macro expansion now works finely for instance macro invocations * Macros are now hidden behind -Xmacros * Bodies of macros now have "import _context._" in their preamble * Macros are now loaded from classpath, much like regular libraries * Macros can now override methods (in that case macro expansion does not crash if macro is not found, it just falls back to super) Review by @odersky.
* Revert "Fixing inliner visibility issue."Paul Phillips2012-01-173-15/+0
| | | | | | This reverts commit 2820770bffe2e7d180bccbcd7a3d83944b1dd8d6. Last minute change had unintended consequences.
* Fixing inliner visibility issue.Paul Phillips2012-01-173-0/+15
| | | | | | | Changes motivated by ICodeReader neglecting to utilize logic which exists in its superclass. Now you can enjoy empty package classes being inlined into other empty package classes. Closes SI-4925.
* Less regressive package object fix.Paul Phillips2012-01-163-0/+20
| | | | At least I think so.
* Fix for raw types issue found in the IDE.Paul Phillips2012-01-142-0/+10
|
* Fix for crasher in uncurry.Paul Phillips2012-01-131-0/+8
| | | | A small dose of packedType closes SI-4869.
* Fix for spurious implicit ambiguity with package objects.Paul Phillips2012-01-132-0/+16
| | | | Closes SI-3999. Review by @odersky.
* Remedy spurious bounds conformance failure.Paul Phillips2012-01-061-0/+19
| | | | | | | Misters hkarg and hkparam have to work harder to see things from the same perspective, so they don't end up in a huff over bounds which were the same all along. Closes SI-5020, review by @moors.
* Fix for crasher during type inference.Paul Phillips2012-01-062-0/+72
| | | | | Well, "fix" is pretty generous, how about "workaround". It does seem to do the job. Closes SI-4070, review by @moors.
* Fix issue with higher-order type params.Paul Phillips2012-01-051-0/+17
| | | | | | | | | | | | I think I found an issue underlying more than one bit of sketchy behavior amongst CC[_] and friends. Plus, I managed to initialize TypeConstraints with the bounds of the originating type parameter. I feel like that should cause something nifty to happen somewhere, but I have seen neither confetti nor lasers in greater quantities than I usually do. Will keep my remaining eye out. Closes SI-5359, review by @moors.
* Optimization in refchecks.Paul Phillips2012-01-051-1/+1
| | | | Making the inherited java vararg check cheaper.
* Tone down insensible-equality warning.Paul Phillips2011-12-272-0/+10
| | | | Closes SI-5175.
* Fixed regression in lub calculation.Paul Phillips2011-12-261-0/+12
| | | | | | | | | | | | | | | | | Changing NullaryMethodType to be a SimpleTypeProxy because nearly all its operations forward to its result type was it seems not such a good idea, because it also meant that calling .underlying returned the result type rather than the method type. The way this materialized was in subtype checks of refinement types. A lub is calculated for two nullary method types in the course of calculating a refinement, and then the input types are checked against the calculated lub. However in the lub refinement, the nullary method type has become a bare typeref, and so the subtype check failed. Closes SI-5317. This does give me confidence that all the malformed lubs one sees logged under -Ydebug (and there are still many, especially with type constructors) are alerting us to real bugs elsewhere in Types.
* [vpm] emitting switches -- BodyTreeMakerAdriaan Moors2011-12-244-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) introduce BodyTreeMaker to get rid of special casing for body now each case is a list of TreeMakers rather than a pair of such a list and a tree needed to do this since emitting switches requires access to the untranslated body 2) emitting switches - alternatives are flattened: each alternative block ends with a jump to the next alternative (if there is one) - to avoid stack overflow in typedMatch: detect when translateMatch returns a Match the patch to uncurry would be nicer with an extractor, but that breaks due to a bug in old patmat made trees into dags again -- NPE in erasure tree.duplicate seems to break lambdalift because it does not give fresh symbols (or trees?) to the valdefs for the arguments of duplicated functions duplicate enclosing tree, not subtrees improved propagateSubstitution for AlternativesTreeMaker - it now propagates to all its alternatives, so we don't have to do that in chainBefore - by making propagation more regular, a bug in substitution in AlternativesTreeMaker manifested itself it introduced a new binder, unnecessarily, which then was unbound -- now reusing binder of outer pattern having removeSubstOnly in propagateSubstitution unveiled a bug: guard treemaker should substitute move fixerUpper closer to what it fixes up
* Test case closes SI-5119.Paul Phillips2011-12-191-0/+13
|
* Test case closes SI-4063.Paul Phillips2011-12-121-0/+39
|
* Test case closes SI-4273.Paul Phillips2011-12-121-0/+8
|
* Fixing wrong-testing test.Paul Phillips2011-12-021-1/+1
|
* Test case closes SI-4758.Paul Phillips2011-12-021-0/+17
|
* Test case closes SI-5084.Paul Phillips2011-12-021-0/+5
|
* Fixed -Xfuture 5.ds, deprecated 0-octal.Paul Phillips2011-11-292-0/+6
| | | | | | | | I messed up my trip to the future the first time around; now in the future 5.f is not an error but an attempt to call method "f" on 5 like nature intended. (Thank you simon for catching this.) And deprecated leading 0 for octal. Closes SI-5205.
* Added the check against UnitClass in freeLocals...Eugene Burmako2011-11-291-0/+3
| | | | | | Added the check against UnitClass in freeLocalsTraverser. Closes SI-5245. Review by odersky.
* Revised macro defs, added a test case.Martin Odersky2011-11-282-0/+11
|
* test case for SI-3566vogt2011-11-281-0/+11
| | | | | no review
* Annotations reacquainted with reification.Paul Phillips2011-11-261-0/+6
| | | | | | | Had AnnotationInfo extend Product3 since it's no longer a case class. Tried to make reflection a little more robust. Closes SI-5223, review by vogt.
* Compiler part of fast orElse.Martin Odersky2011-11-221-16/+0
| | | | | | | "According to the spec this code should not be legal. Disabling for now." Need to come back and either make it work or (more likely) make nsc reject the test)
* Reverted ProductN parent for case classes.Paul Phillips2011-11-164-33/+0
| | | | | Looks like we will need blood, toil, tears, and sweat. No review.
* revert r25877. no reviewLukas Rytz2011-11-149-0/+0
|
* A comment answering one of adriaan's philosophi...Paul Phillips2011-11-111-0/+8
| | | | | | A comment answering one of adriaan's philosophical musings on why programs fail, and a test case informed by the comment. Review by moors.
* Fix for regression in overriding with defaults.Paul Phillips2011-11-101-0/+11
| | | | | | | I should know better than to behave as if usable inferences can be drawn from a comment like "SYNTHETIC because of DEVIRTUALIZE". Maybe it was even true when it was written, but no more. Closes SI-5178, no review.
* Closes IDE-1000567, SI 5013. No Review.Martin Odersky2011-11-072-0/+10
|
* Fixed hang in typechecker.Paul Phillips2011-11-071-0/+21
| | | | | | | Another page in the storied history of "check the normalized type, then act on the unnormalized type", in this case leading to a tight loop of foreverness. Closes SI-5156, review by moors.
* Begone t1737...Hubert Plociniczak2011-11-02262-661/+653
|
* Clean result of function type.Paul Phillips2011-10-311-0/+14
| | | | | NullaryMethodType was escaping. Closes SI-5099, review by moors.
* Closes #5127. Review by extempore.Martin Odersky2011-10-311-0/+8
|
* Fix for crasher in explicitouter.Paul Phillips2011-10-291-0/+13
| | | | | Closes SI-4970, review by moors.
* Test case closes SI-4957.Paul Phillips2011-10-291-0/+89
| | | | | No review.
* Added a -Yno-productN option.Paul Phillips2011-10-242-0/+3
| | | | | Suppresses ProductN parent for case classes. No review.
* fixed svn props in test directorymichelou2011-10-229-0/+0
|
* virtpatmat, hidden behind -YvirtpatmatAdriaan Moors2011-10-2014-0/+105
| | | | | | | | | at least one imminent TODO: undo hardwired generation of if/then/else, and decide based on type whether to call flatMap/orElse or inline those methods from Option review by extempore
* infer singleton when asking for itAdriaan Moors2011-10-202-0/+6
| | | | | | | | | | | | | a type var's constraint now also tracks whether the type var was compared to a stable type if it was, we probably shouldn't widen the type argument that's inferred for this var, as the result will surely fail to type check NOTE: must be enabled using -Xexperimental review by extempore