aboutsummaryrefslogtreecommitdiff
path: root/tests/pos
Commit message (Collapse)AuthorAgeFilesLines
* Uncomment testsMartin Odersky2015-05-271-2/+2
|
* Introduce harmonization of numeric argumentsMartin Odersky2015-05-271-0/+28
| | | | | | | | | | | | | | Harmonization is Dotty's alternative to Scala 2's notion of weak conformance. It is less powerful but also less entangled with the core type system. The idea is that in some specific contexts trees that all have primitive numeric types will be converted as necessary so that they all have the same numeric type. These tree sets are: - the two branches of an if - the alternatives of a match - the body together with the catch blocks of a try - the arguments of a vararg parameter Examples are in the test file, harmonize.scala.
* New pos testsMartin Odersky2015-05-275-0/+62
| | | | Some of them were moved from disabled after verifiying that they compile now.
* Calibrate findMember logging thresholds and test caseMartin Odersky2015-05-211-0/+52
| | | | | | | | | | | | Adds IterableSelfRec.scala which caused lockup of the compiler. After a lot of work the problem was determined to be polyomial or exponential behavior of the compiler when executing findMember on refined types that contain several bindings where the resutling & causes a recursive invokation of findMember with the same name. We do have a stop for this now, but if the stop comes too late the runtime will grow very fast. Problem addressed by kiccking in earlier with the stopping logic.
* Add test case for higher-kinded operations on collectionsMartin Odersky2015-05-211-0/+52
| | | | The test case that caused all previous commits in this branch.
* Make normalizeToRef survive annotated typesMartin Odersky2015-05-211-1/+1
| | | | Did not handle this case before.
* Disallow {...} arguments for annotationsMartin Odersky2015-05-211-0/+13
| | | | | This mimics scalac's behavior (but not the official syntax; in fact the official syntax seems to be ambiguous.
* Fix null unboxing of primitives (fixes #582)Guillaume Martres2015-05-181-11/+0
| | | | | Erasure#isUnbox was incorrect: the unbox methods are defined on the value classes, not the boxed classes.
* As i566 shows, it is possible to have a package as prefix, a packageMartin Odersky2015-05-151-0/+5
| | | | | | | | | | object as owner and be followed by type arguments: reflect.classTag[T] expands to reflect.`package`.classTag[T]
* Merge pull request #551 from dotty-staging/fix/#547-overloaded-varargsDmitry Petrashko2015-05-091-0/+4
|\ | | | | Fix #547: Vararg overload
| * Fix #547: Vararg overloadMartin Odersky2015-05-081-0/+4
| | | | | | | | | | When comparing to types in isAsSpecific, onvert repeated parameters to their underlying type only if both types are vararg methods. This mimics scalac behavior.
* | Merge pull request #543 from dotty-staging/compile-dottyodersky2015-05-091-0/+3
|\ \ | | | | | | Make dotty compile backend.
| * | Drop the requirement that extractors with `get` must implement ProductMartin Odersky2015-05-081-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | We used to require that the result type of an extractor `get` is a product, or else the type of the `get` itself would be taken as the result type of the unapply. This is now relaxed so that we automatically select with _1, _2, ... as soon as there are multiple argument patterns, and (1) the result type is not a Seq, (2) the number of consecutive product conselectors matches the number of arguments.
| * | Fix #536 - only load member classes of classes that are currently compiled.Martin Odersky2015-05-071-0/+3
| | | | | | | | | | | | | | | | | | | | | It seems wasteful to load the member classes even of classes that are not currently compiled. It also makes us vulnerable to any misinterpretation of Java file formats. In th particular case of #536, we parsed a class an anonymous Collection$1 which was referring to the type parameter of its enclosing class, but was not diagnosed as an inner class of the enclosing class.
* | | Merge pull request #542 from dotty-staging/fix/#540-unbounded-generic-arrayDmitry Petrashko2015-05-081-0/+6
|\ \ \ | |_|/ |/| | Fix #540 - unbounded array test for wildcard array arguments
| * | Fix #540 - unbounded array test for wildcard array argumentsMartin Odersky2015-05-061-0/+6
| |/ | | | | | | | | | | Arrays with wildcard arguments such as Array[_ <: Foo] where Foo is a universal trait are now diagnosed as unbounded generic arrays and are erased to Object.
* / Drop the requirement that extractors with `get` must implement ProductMartin Odersky2015-05-051-0/+32
|/ | | | | | | | | We used to require that the result type of an extractor `get` is a product, or else the type of the `get` itself would be taken as the result type of the unapply. This is now relaxed so that we automatically select with _1, _2, ... as soon as there are multiple argument patterns, and (1) the result type is not a Seq, (2) the number of consecutive product conselectors matches the number of arguments.
* Merge pull request #534 from dotty-staging/fix/computeDenotodersky2015-05-051-0/+6
|\ | | | | Fix #518 - compute denotations
| * Add test caseMartin Odersky2015-05-041-0/+6
| | | | | | | | Tests #518.
* | Merge pull request #509 from dotty-staging/add/expandSAMsDmitry Petrashko2015-05-042-0/+80
|\ \ | | | | | | Expand SAM closures to anonymous classes if needed
| * | More conditions under which SAMs are converted to anonymous classesMartin Odersky2015-05-021-0/+12
| | | | | | | | | | | | | | | | | | | | | Also included are - Closures implementing classes that inherit from a class other than Object - Closures that implement traits which run initialization code.
| * | Make sure types of pattern bound variables are fully-defined.Martin Odersky2015-05-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Like all other variables, pattern-bound vars need a fully defined type. I was thinking originally that demanding a fully defined selector type is sufficient to ensure this, but that's not true: An outer pattern might call a polymorphic unapply and its type variables need not be fully instantiated. With the fix, the minimized test case from ExpandSAMs works.
| * | New miniphase: ExpandSAMsMartin Odersky2015-05-021-0/+63
| | | | | | | | | | | | The phase replaces SAM closures with anonymous classes when necessary.
* | | Merge pull request #529 from dotty-staging/fix/#503Dmitry Petrashko2015-05-042-0/+30
|\ \ \ | | | | | | | | Fix of #503
| * | | New testsMartin Odersky2015-05-042-1/+22
| | | | | | | | | | | | | | | | | | | | Added test for previous PR on super accessors. Updated test for #503 to check both inner classes and inner traits.
| * | | Treat references to modules and lazy vals as outer referencesMartin Odersky2015-05-041-0/+9
| | |/ | |/| | | | | | | Previously, we considered only methods. #503 shows that this is wrong.
* / | Fix compatibility of Java with value classesGuillaume Martres2015-05-043-0/+19
|/ / | | | | | | | | | | | | | | | | | | This avoids getting a runtime error when calling a Java-defined method whose signature contains value classes. It happened because we erased the value classes in this signature even though it comes from a classfile. Amusingly, this problem also exists in scalac: <https://issues.scala-lang.org/browse/SI-9298>
* | Merge pull request #517 from dotty-staging/add/expand-privatesodersky2015-05-041-0/+4
|\ \ | | | | | | Expand private members if necessary
| * | New miniphase: ExpandPrivateMartin Odersky2015-05-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A late miniphase which resets private flag of all members that are not accessed from within same class. Replaces logic in RefChecks. Doing this late has two advantages - we can use name expansion, because references are symbolic, so the names of symbols and references to them do not need to correspond anymore. - we can automatically correct for symbols moved in earlier phases (e.g. lifted out by LambdaLift).
* | | Merge pull request #526 from dotty-staging/fix/#522odersky2015-05-033-0/+25
|\ \ \ | | | | | | | | Fix #522.
| * | | Moved tests from pendingMartin Odersky2015-05-033-5/+20
| | | |
| * | | Fix #522.Martin Odersky2015-05-031-0/+10
| | | | | | | | | | | | | | | | | | | | We were missing a substitution in full parameterization. Embarraingly, this made even the example in the doc comment of `fullyParameterizedDef` fail.
* | | | Enable test strip-tvars-for-lubbasetypes.scalaGuillaume Martres2015-05-031-0/+25
|/ / / | | | | | | | | | | | | The test had to be slightly modified because of dotty's stricter checking of type bounds validity, see #525 where this was discussed.
* | / Fix #523: Instantiate lower bound when bounds checkingMartin Odersky2015-05-021-0/+8
| |/ |/| | | | | | | | | | | | | Lower bounds need to be instantiated just like upper bounds. F-bounded polymorphism (which only applies too upper bounds) is one reason for instantiating arguments, but parameters referring to other parameters is another one. An the latter applies to lower bounds as well.
* | Enable pending pos tests related to value classesGuillaume Martres2015-05-015-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | Each test needs to have its own package because pos_all will try to compile the whole valueclasses directory at once. The remaining tests with "extends AnyVal" in tests/pending/pos are related to separate compilation, except for: - t6482.scala and t7022.scala which were fixed by https://github.com/scala/scala/pull/1468 in scalac and seem to trigger a similar bug in FullParameterization - strip-tvars-for-lubbasetypes.scala which was fixed by https://github.com/scala/scala/pull/1758 in scalac
* | Enable untried pos tests related to value classesGuillaume Martres2015-05-0118-0/+211
| | | | | | | | | | 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-301-0/+15
|\ | | | | Implement/i499
| * Add test for by-name varargsMartin Odersky2015-04-251-0/+15
| |
* | Disable failing tests. See #503Dmitry Petrashko2015-04-302-28/+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-281-0/+7
|\ \ | | | | | | Refactor/super accessors
| * | 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-231-3/+9
|/
* 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-091-1/+1
|