summaryrefslogtreecommitdiff
path: root/test/files/scalap
Commit message (Collapse)AuthorAgeFilesLines
* Backport of SI-6846.Jason Zaugg2013-01-0818-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: commit 55806cc0e6177820c12a35a18b4f2a12dc07bb39 Author: Paul Phillips <paulp@improving.org> Date: Wed Dec 19 07:32:19 2012 -0800 SI-6846, regression in type constructor inference. In 658ba1b4e6 some inference was gained and some was lost. In this commit we regain what was lost and gain even more. Dealiasing and widening should be fully handled now, as illustrated by the test case. (cherry picked from commit dbebcd509e4013ce02655a2687b27d0967b3650e) commit e6ef58447d0f4ef6de956fcc03ee283bb9028c02 Author: Paul Phillips <paulp@improving.org> Date: Fri Dec 21 15:11:29 2012 -0800 Cleaning up type alias usage. I determined that many if not most of the calls to .normalize have no intent beyond dealiasing the type. In light of this I went call site to call site knocking on doors and asking why exactly they were calling any of .normalize .widen.normalize .normalize.widen and if I didn't like their answers they found themselves introduced to 'dropAliasesAndSingleTypes', the recursive widener and dealiaser which I concluded is necessary after all. Discovered that the object called 'deAlias' actually depends upon calling 'normalize', not 'dealias'. Decided this was sufficient cause to rename it to 'normalizeAliases'. Created dealiasWiden and dealiasWidenChain. Dropped dropAliasesAndSingleTypes in favor of methods on Type alongside dealias and widen (Type#dealiasWiden). These should reduce the number of "hey, the type alias doesn't work" bugs. (cherry picked from commit 3bf51189f979eb0dd41744ca844fd12dfdaa0dee) Conflicts: src/compiler/scala/tools/nsc/interpreter/CompletionOutput.scala commit c1d8803cea1523f458730103386d8e14324a9446 Author: Paul Phillips <paulp@improving.org> Date: Sat Dec 22 08:13:48 2012 -0800 Shored up a hidden dealiasing dependency. Like the comment says: // This way typedNew always returns a dealiased type. This // used to happen by accident for instantiations without type // arguments due to ad hoc code in typedTypeConstructor, and // annotations depended on it (to the extent that they worked, // which they did not when given a parameterized type alias // which dealiased to an annotation.) typedTypeConstructor // dealiases nothing now, but it makes sense for a "new" to // always be given a dealiased type. PS: Simply running the test suite is becoming more difficult all the time. Running "ant test" includes time consuming activities of niche interest such as all the osgi tests, but test.suite manages to miss the continuations tests. (cherry picked from commit 422f461578ae0547181afe6d2c0c52ea1071d37b) commit da4748502792b260161baa10939554564c488051 Author: Paul Phillips <paulp@improving.org> Date: Fri Dec 21 12:39:02 2012 -0800 Fix and simplify typedTypeConstructor. Investigating the useful output of devWarning (-Xdev people, it's good for you) led back to this comment: "normalize to get rid of type aliases" You may know that this is not all the normalizing does. Normalizing also turns TypeRefs with unapplied arguments (type constructors) into PolyTypes. That means that when typedParentType would call typedTypeConstructor it would find its parent had morphed into a PolyType. Not that it noticed; it would blithely continue and unwittingly discard the type arguments by way of appliedType (which smoothly logged the incident, thank you appliedType.) The simplification of typedTypeConstructor: There was a whole complicated special treatment of AnyRef here which appears to have become unnecessary. Removed special treatment and lit a candle for regularity. Updated lots of tests regarding newly not-so-special AnyRef. (cherry picked from commit 394cc426c1ff1da53146679b4e2995ece52a133e) commit 1f3c77bacb2fbb3ba9e4ad0a8a733e0f9263b234 Author: Paul Phillips <paulp@improving.org> Date: Fri Dec 21 15:06:10 2012 -0800 Removed dead implementation. Another "attractive nuisance" burning off time until I realized it was commented out. (cherry picked from commit ed40f5cbdf35d09b02898e9c0950b9bd34c1f858)
* Disabled generation of _1, _2, etc. methods.Paul Phillips2012-10-221-2/+0
| | | | | | | This was part of the introduction of ProductN, which had to go back into pandora's box because of issues with cycles during typing. These should have been reverted along with it.
* A boatload of work on Symbols and Flags.Paul Phillips2012-04-051-0/+6
| | | | | | | Finally my dream of orderliness is within sight. It's all pretty self-explanatory. More polymorphism, more immutable identity, more invariants.
* Removing unnecessary AnyVal code.Paul Phillips2012-02-062-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | ...since it works from source. The parser must be forcibly restrained from adding a bogus constructor, but other than that it's pretty much smooth sailing. To give an idea how smooth, if I change scala.Short like so: trait Bippy extends Any final class Short extends AnyVal with Bippy Then it just works, at least until the fiction is revealed. scala> def f(x: Bippy) = x f: (x: Bippy)Bippy scala> f(5) <console>:9: error: type mismatch; found : Int(5) required: Bippy f(5) ^ scala> f(5: Short) java.lang.ClassCastException: java.lang.Short cannot be cast to scala.Bippy at .<init>(<console>:9) at .<clinit>(<console>) at .<init>(<console>:11)
* Fixed a bunch of scalap check files to account for absence of ScalaObjectMartin Odersky2012-02-0619-24/+24
|
* Reverted ProductN parent for case classes.Paul Phillips2011-11-161-1/+3
| | | | | Looks like we will need blood, toil, tears, and sweat. No review.
* Begone t1737...Hubert Plociniczak2011-11-023-3/+3
|
* A few pending refinements to SyntheticMethods.Paul Phillips2011-09-281-1/+0
| | | | | No review.
* ProductN, and method synthesis toolbox.Paul Phillips2011-09-262-11/+13
| | | | | | | | | | | | | | | | | | | | | | - Finished giving case classes a ProductN parent, and flipped it on. The "finish" part involved not breaking existing code where case classes manually extend the appropriate ProductN. (Like, Tuple 1-22.) - Generalized most of SyntheticMethods to ease method creation and class manipulation in general. - Fixed bugs related to the above, like the fact that this used to be a compile error: scala> case class Foo() extends Serializable <console>:28: error: trait Serializable is inherited twice case class Foo() extends Serializable ^ It feels like there's a better way to eliminate the duplicate parents, but after spending a lot of time chasing my tail in that peril-fraught zone between namer and typer, I don't see an easy path to improve on it. Closes SI-1799. For that modification to Typers, review by odersky.
* Fix a scalap checkfile, no review.Paul Phillips2011-07-011-0/+1
|
* Deprecated the @serializable annotation, introd...Lukas Rytz2010-11-302-4/+3
| | | | | | | | | | | | | | | | | | | Deprecated the @serializable annotation, introduce a new trait "scala.Serializable" which has to be extended instead (cross-platform). Known issues: - Companion objects of serializable classes (including case classes) are automatically made serializable. However, they don't extend "Serializable" statically because of the known difficulty (should be done before typing, but hard). - Writing "case class C() extends Serializable" gives "error: trait Serializable is inherited twice" - Functions are serializable, but don't extend Serializable dynamically (could be fixed by making FunctionN Serializable - shouldn't we?) Note that @SerialVersionUID continues to be an annotation; it generates a static field, which is not possible otherwise in scala. Review by dragos, extempore. Question to dragos: in JavaPlatform.isMaybeBoxed, why is there a test for "JavaSerializableClass"? Is that correct?
* better fix for see #3667.Lukas Rytz2010-08-172-2/+0
|
* close #3667.Lukas Rytz2010-08-052-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | scala> def ser(o: AnyRef) = new java.io.ObjectOutputStream(new java.io.ByteArrayOutputStream()).writeObject(o) ser: (o: AnyRef)Unit scala> @serializable class Outer { | case class Inner(x: Int) | } defined class Outer scala> val o = new Outer o: Outer = Outer@34469729 scala> ser(new o.Inner(1)) scala> o.Inner // initialize the Inner$module field of o res1: o.Inner.type = Inner scala> ser(new o.Inner(1)) java.io.NotSerializableException: Outer$Inner$ review by extempore.
* Half-disabled productElementName until I have t...Paul Phillips2010-03-192-2/+0
| | | | | | | Half-disabled productElementName until I have time to reimplement it more to martin's liking. ("Half" because full disabling is not possible until starr has forgotten about it.) No review.
* #3128 fixedilyas2010-03-022-0/+19
|
* trailing spaces in decompiled annotations are t...ilyas2010-03-011-1/+1
| | | | | trailing spaces in decompiled annotations are trimmed
* scalap tests fixedilyas2010-03-016-10/+9
|
* typo in test fixedilyas2010-03-011-1/+1
|
* #2885 fixedilyas2010-03-012-0/+6
|
* #3060 fixedilyas2010-03-012-0/+17
|
* Added productElementName to Product.Paul Phillips2010-02-232-0/+2
| | | | | | | | | | | | | | | case class field names your heart desires. Review by odersky. scala> case class Foo[T](kilroy: String, burma: List[T], shave: Seq[Int]) defined class Foo scala> Foo("was here", List('myanmar), Seq(25, 25)) res0: Foo[Symbol] = Foo(was here,List('myanmar),List(25, 25)) scala> 0 to 2 map (res0 productElementName _) res1: IndexedSeq[String] = IndexedSeq(kilroy, burma, shave)
* testdata changedilyas2010-02-051-4/+4
|
* some scalap tweaksilyas2010-02-052-3/+3
|
* Removing defaultGetter field from TermSymbols.Lukas Rytz2010-01-281-2/+2
|
* #2747 fixedilyas2009-12-041-2/+2
|
* [no content change] Fixed all SVN properties: m...Gilles Dubochet2009-09-2432-32/+32
| | | | | | | | [no content change] Fixed all SVN properties: mimes, EOL, executable. Id expansion is consistently enabled for Scala/Java/C# sources in 'src/' and consistently disabled and removed from everywhere else: there should not be any dead Id tags anymore.
* Implementation and test cases for canEqual meth...Paul Phillips2009-07-092-0/+2
| | | | | | | Implementation and test cases for canEqual method in case classes. Now the autogenerated equality method inquires with the argument as to whether other.canEqual(this) before returning true.
* scalap changed to treat named parameters and pa...ilyas2009-06-2923-1/+85
| | | | | scalap changed to treat named parameters and package objects
* Named and default argumentsLukas Rytz2009-05-3014-44/+0
| | | | | | | - MethodTypes now have (params: List[Symbol]) - "copy"-methods for case classes - the "copy" object in the compiler is now called "treeCopy"
* massive new collections checkin.Martin Odersky2009-05-086-28/+0
|
* Scala decompiler test suite addedilyas2009-05-0632-0/+130