aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Enable untried pos tests related to value classesGuillaume Martres2015-05-0122-32/+32
| | | | | Each test needs to have its own package because pos_all will try to compile the whole valueclasses directory at once.
* Erasure: properly handle null in value classesGuillaume Martres2015-05-011-0/+27
| | | | This fixes the issues reported in SI-5866 and SI-8097
* Merge pull request #500 from dotty-staging/implement/i499Dmitry Petrashko2015-04-302-0/+43
|\ | | | | Implement/i499
| * Add tests for #499Dmitry Petrashko2015-04-301-0/+28
| |
| * Add test for by-name varargsMartin Odersky2015-04-251-0/+15
| |
* | Disable failing tests. See #503Dmitry Petrashko2015-04-302-0/+0
| |
* | Add a test for a deferred object in interface.Dmitry Petrashko2015-04-301-0/+6
| |
* | Merge pull request #495 from dotty-staging/refactor/SuperAccessorsDmitry Petrashko2015-04-282-0/+19
|\ \ | | | | | | Refactor/super accessors
| * | Unpickle ImportsMartin Odersky2015-04-221-0/+12
| | | | | | | | | | | | | | | | | | Was missing before. Needed a tweak in PlainPrinter for printing import symbol references (their denotation is not current after pickling, so they would have printed differently after and before pickling).
| * | Drop restriction that SuperAccessors should not touch patternsMartin Odersky2015-04-221-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not sure why we need to do this, and in any case it's not sure what constitutes a pattern. There are certainly some parts of patterns (e.g. prefixes of unapplies, or their implicit arguments) that should be transformed under SuperAccessors, so the previous condition was too coarse. We include the test case that motivated the restriction. It looks like it works now.
* | | Merge pull request #498 from dotty-staging/save-tastyDmitry Petrashko2015-04-282-0/+26
|\ \ \ | |_|/ |/| | Save TASTY in attribute of classfiles.
| * | Allow separate compilation of Dotty using TASTYMartin Odersky2015-04-252-0/+26
| |/ | | | | | | | | Classfile parser now reads TASTY attributes or annotations and unpickles them in order to allow for separate compilation.
* | Add a neg test for SAMs.Dmitry Petrashko2015-04-231-0/+1
| |
* | Fix #492. Traits that require an outer pointer are not SAMs.Dmitry Petrashko2015-04-232-3/+16
|/
* Merge pull request #474 from dotty-staging/alt/instantiation-checksDmitry Petrashko2015-04-202-0/+66
|\ | | | | Alt/instantiation checks (2)
| * Added phase to check `New` nodes for instantiability.Martin Odersky2015-04-131-0/+38
| | | | | | | | | | | | - Abstract classes cannot be instantiated (exceptions: parent news and Java annotations) - Instantiateed class must conform to its self type.
| * Self type inheritance checkMartin Odersky2015-04-131-0/+28
| | | | | | | | Check that the self type of a class conforms to the self types of its parent classes.
* | Merge pull request #482 from vsalvis/vsalvis-partest2Dmitry Petrashko2015-04-201-0/+0
|\ \ | | | | | | Partest for Dotty with pos tests and neg tests with error count
| * | Using FileLock to distinguish between test and partest modevsalvis2015-04-201-0/+0
| |/
* | Fix #342 Lambda lift idents need to get new prefixMartin Odersky2015-04-171-0/+10
| | | | | | | | | | Idents of lifted symbols become class members, need to carry the right reference with the right prefix as type.
* | Improve documentation and minimze testMartin Odersky2015-04-172-0/+19
|/ | | | | | | Documentation around markFree and narrowLiftedOwner was added. i480 was minimzed and dependencies on dotc were removed. (+1 squashed commit) Squashed commits: [1a84054] Test cases for #480
* Ensure spaces after `if` in Dotty tests.Dmitry Petrashko2015-04-0917-20/+20
|
* Add spaces around + in tests.Dmitry Petrashko2015-04-0935-86/+86
|
* Remove trailing spaces in Dotty tests.Dmitry Petrashko2015-04-0943-151/+151
|
* Replace tabs with 4 spaces in Dotty tests.Dmitry Petrashko2015-04-0999-274/+274
|
* Make all dotty tests end in newlineDmitry Petrashko2015-04-0931-31/+31
|
* Backend: Emmit simple annotationsDmitry Petrashko2015-04-032-0/+14
|
* Merge pull request #425 from smarter/fix/isNullableClassodersky2015-03-261-0/+11
|\ | | | | Fix isNullableClass to also work after Erasure
| * Fix isNullableClass to also work after ErasureGuillaume Martres2015-03-231-0/+11
| | | | | | | | | | | | | | | | | | | | Incidentally this means that: val d = null.asInstanceOf[Double] is now correctly transformed to: val d = scala.Double.unbox(null) Previously it was translated to: val d = null: Double Which is wrong and fails in the backend.
* | Merge pull request #428 from dotty-staging/trait-constructorsDmitry Petrashko2015-03-251-12/+12
|\ \ | | | | | | New phase: trait constructors
| * | Fix failing tets: test instantiated abstract traits.Dmitry Petrashko2015-03-251-12/+12
| |/
* / Fix #429Martin Odersky2015-03-251-0/+3
|/ | | | enclosingMethod should not crash on NoDenotation.
* Pickling test reorgMartin Odersky2015-03-1821-1/+1
| | | | | | | | Move pickling tests into separate top-level test directory. That way they are not needlessly pos-tested before. Also, disable core tests for now - after rebasing we get a stale symbol error. Need to investigate that.
* Pickle shadowed namesMartin Odersky2015-03-181-1/+2
| | | | | | | | | Shadowed names in types need to be pickled and treated on unpickling. We choose to make Shadowed a separate TastyName class, to avoid the ad-hoc name-mangling in current dotc. When names are redone Shadowed will also become a special class in the compiler proper.
* Deal gracefully with out-of-scope references wehn unpicklingMartin Odersky2015-03-181-0/+65
| | | | | | | | | | | | | | | Out-of scope references are evil but do arise. Dotc currently produces them in two cases (t1957.scala and Typer.scala) because it does not correctly hygenize dependent methods used as closurs. I beleive scalac wil generate them in more instances. The changes can produce dependent method types used in closures. Essentially the problem was that the depndency was not recognized in Typers when the closure was first created, because it badly interfered with type inference. But when unpickling the same closure the dependency is recognized. It's too late to fail now, we better deal with this gracefully. That's why there is now a mode bit "AllowDependentFunctions" which should be turned on only for unpickling, which reconstitutes dependent functions as closures without complaining.
* More testsMartin Odersky2015-03-188-0/+217
| | | | Both some long overdue pos tests and more pickleOK tests
* Fix TastyReader#readLongIntMartin Odersky2015-03-181-0/+33
|
* Compute PureInterface flag after pickling.Martin Odersky2015-03-188-0/+399
| | | | | | | | | | ElimLocals becomes a slightly less trivial transform: NormalizeFlags. It also computes PureInterface flag, thus relieving Namer and Unpickler from doing the same in two different ways. Besides, the computation in Namer/TreeInfo was flawed because it did not take into account that nested non-static classes are not allowed in an interface (only static classes are, but these would not be members of the interface in the Scala sense).
* Allow several units to be pickle-tested at once.Martin Odersky2015-03-186-0/+155
| | | | | | | | Also: Make Pickler a plain phase; it is neither a macro transformer nor a miniphase. Add tests to pickleOK that are known to be stable under pickling/unpicking by comparing tree representations via show.
* Better tracking of unhygienic closure typesMartin Odersky2015-03-181-2/+27
| | | | | | | | We have two unhygienic closures left - one in t1957.scala the other in Typer.scala. This commit leaves some printlns that can be uncommented to get more info on these. It would be better to fix them but I am running out of time to do so. Maybe someone else can pick up with the info this commit allows to recover. To find out more, go to t1957.scala and read the comment.
* Avoid dependent methods being closures.Martin Odersky2015-03-181-0/+12
| | | | | We now make sure that a closure's result type does avoid references to parameter types.
* Change scheme of translating array creations new Array(...)Martin Odersky2015-03-181-1/+2
| | | | | | | | | | The previous scheme generated too many newGenericArray expressions because at the time newArray was called, the type arguments were not yet determined. Furthermore, the type variables somehow did not have the right positions, which caused them not to be interpolated and led to orphan PolyParams. The new scheme converts the expression when the length parameter has been supplied and it fully determines the array type before converting.
* Disallow refinements of types or methods that do not appear in parent.Martin Odersky2015-03-1811-77/+89
| | | | | | | | We planned this for a long time but never implemented it. Instead, we sometimes issued an erro in Splitter, namely if reflection would have been needed to access the member. It turns out that some tests (e.g. neg/t625) fail -Ycheck (we knew that before and disabled) but also fail Pickling because they generate orhpan PolyParams. So rather than patching this up it seems now is a good time to enforce the restriction for real.
* Merge pull request #404 from dotty-staging/backend-mergeDmitry Petrashko2015-03-181-0/+17
|\ | | | | Fixes to erasure, backend, flatten, restorescopes,
| * Handle boxing inside labels, jump back to box.Dmitry Petrashko2015-03-181-0/+17
| | | | | | | | | | Erasure inserts boxing and unboxing of label returned values, ignoring the fact that some labels do not return. Now this is taken into account also inside labels which refer labels themselves
* | Merge pull request #407 from dotty-staging/fix/#400odersky2015-03-131-0/+13
|\ \ | | | | | | Fix #400
| * | Fix #400Martin Odersky2015-03-131-0/+13
| |/ | | | | | | In a call-by-name arg, replace () => f.apply() with f only if f is pure.
* | Merge pull request #408 from dotty-staging/test/#390Dmitry Petrashko2015-03-131-0/+0
|\ \ | | | | | | New test for valueclasses
| * | New test for valueclassesMartin Odersky2015-03-131-0/+0
| |/ | | | | | | | | | | Re-instantiated t2667.scala, which failed before because of issue #390. Also changed order of tests in isDerivedValueClass, to make more disriminating test come first.
* / add/strictMartin Odersky2015-03-132-0/+0
|/ | | | | | | | | | | Add -strict option to do some type checks that are encessary to ensure type soundness, but are stricter than what Scala 2.x enforces. The first such test is the "pattern cannot be uniquely instantiated" problem where we reject a non-variant case subclass of a covariant superclass in a pattern match. The error is now only issued in -struct mode, otherwise it will be a warning. We might move more tests into the same category. This should help the transition.