aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Extend implicits testMartin Odersky2015-11-171-0/+6
| | | | ... to show that we support implicit patterns.
* Generalize test to function classesMartin Odersky2015-11-162-0/+19
| | | | | | The previous test was too struct, missed cases where some arguments of the function were unbound. i583a.scala contains a test case.
* Merge pull request #928 from dotty-staging/stdlib-definitionsDmitry Petrashko2015-11-101-1/+1
|\ | | | | Make Definitions survive recompilation of core definitions.
| * Make symbol methods in Definitions depend on implicit contextMartin Odersky2015-11-091-1/+1
| | | | | | | | | | | | | | Otherwise they would always return the symbol in the original context where Definitions was first created. Also, cache two more arrays of symbols per run.
* | Test that private member selection on AndTypes works.Dmitry Petrashko2015-11-101-0/+17
| |
* | Add minimized example that allows to reproduce issue in erasure.Dmitry Petrashko2015-11-091-0/+11
|/
* Merge pull request #899 from dotty-staging/fix-#880Dmitry Petrashko2015-11-091-0/+17
|\ | | | | Require outer pointer also for proxies of enclosing classes.
| * Require outer pointer also for proxies of enclosing classes.Martin Odersky2015-10-311-0/+17
| | | | | | | | There was a missing case where an outer pointer is required.
* | Merge pull request #927 from dotty-staging/stdlib-boundsodersky2015-11-093-0/+15
|\ \ | | | | | | Drop checking that lower bound is a subtype of upper bound.
| * | Check bounds of inferred typevars in PostTyper.Martin Odersky2015-11-051-0/+8
| | |
| * | Drop test that lower bound must be a subtype of upper bound.Martin Odersky2015-11-052-0/+7
| | | | | | | | | | | | | | | | | | As discussed in #780 and #525, the test is not needed. This makes t1279a compile, which got moved now to pos. Fixes #780 and #915. It also makes scala.List compile. Review by @smarter.
* | | Merge pull request #902 from dotty-staging/fix-numeric-implicit-argsodersky2015-11-094-6/+23
|\ \ \ | | | | | | | | Fix numeric implicit args
| * | | Update check fileMartin Odersky2015-11-012-5/+5
| | | | | | | | | | | | | | | | and explain why it's different now.
| * | | Disable failing testMartin Odersky2015-11-011-2/+6
| | | | | | | | | | | | | | | | | | | | Dotty delivers an ambiguity error. The comment in the test argues why this is OK.
| * | | Better handling of implicits over numeric types.Martin Odersky2015-11-012-0/+13
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compiling scala.math.BigDecimal and scala.math.BigInteger shows a problem. The conversion `int2bigInt` is not applicable to a Byte because `Byte -> Int` requires another implicit conversion. We fix that by using a new method relaxed_<:< for implicit compatibility checks, which always admits numeric widenings. This leads to another problem. Now the conversions implicit def byteToInt(x: Byte): Int implicit def byteToShort(x: Byte): Short are ambiguous when we try to convert from Byte to Int. We fix that by adding a "tie-break" to implicit search where if several methods match a numeric value result type and all have numeric value types as result types, we pick the numerically largest type that matches.
* | | Avoid spurious procedure syntax migration warningMartin Odersky2015-11-091-0/+6
| | |
* | | Handle variance unsoundness in scalacMartin Odersky2015-11-052-0/+47
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The included test pos-special/variances-constr.scala demonstrates an unsoundness in the variance checking of scalac. Scalac excludes symbols owned by constructors from the checking. This is unsound, as can be demonstrated by compiling the test and observing output of the program run: Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at Test$.main(variances-constr.scala:17) at Test.main(variances-constr.scala) Dotty allows this code only under -language:Scala2 and issues a migration warning.
* | Merge pull request #889 from dotty-staging/fix-#877odersky2015-11-051-0/+11
|\ \ | | | | | | Fix #877
| * | Fix #877Martin Odersky2015-10-301-0/+11
| | | | | | | | | | | | Use freshName to name evidence parameters.
* | | Merge pull request #900 from dotty-staging/fix-#871odersky2015-11-053-0/+10
|\ \ \ | | | | | | | | Deal gracefully with missing return types of abstract menthods.
| * | | Deal gracefully with missing return types of abstract menthods.Martin Odersky2015-11-013-0/+10
| | |/ | |/| | | | | | | | | | | | | | | | 1) Better error message: "missing return type" instead of `=' expected. 2) Allow them under language:Scala2 Fixes #871
* | | Merge pull request #901 from dotty-staging/fix-#851Dmitry Petrashko2015-11-031-0/+8
|\ \ \ | | | | | | | | Fix #851 Java parsing forgot type parameters
| * | | Don't interpreter $init$ as a constructor when parsing Java files.Martin Odersky2015-11-011-0/+8
| |/ / | | | | | | | | | Fixes #851.
* | | Enable <:< implicits as conversions.Martin Odersky2015-11-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | These were disabled before, which means that having evidence of S <:< T did not introduce a usable implicit conversion from S to T. We do do it like scalac: just disable Predef.$conforms. This makes TraversableOnce compile. Fixes #914.
* | | Merge pull request #860 from dotty-staging/change-allow-ex-in-hkDmitry Petrashko2015-11-024-15/+262
|\ \ \ | | | | | | | | Change allow ex in hk
| * | | Represent references to Scala2 inner classes as WithFixedSym typesMartin Odersky2015-10-253-262/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reason: An inner Scala2 class might be shadowed by a same-named class in a subtype. In Dotty this is disallowed butin Scala 2 it is possible. For instance, math.Numeric and math.Ordering both have an inner class "Ops". Normal TypeRef types could not select the shadowed class in Ordering is the prefix is of type Numeric.
| * | | Add fixed version of GenTraversableFactory.Martin Odersky2015-10-241-0/+256
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There is still an issue because math uses inner classes named Ops which shadow each other. Dotty can't handle it, so implicit search in `range` goes wrong. The new test has been modified to work around that issue.
| * | | Add test caseMartin Odersky2015-10-241-0/+252
| | | |
| * | | Allow existential types in hk typesMartin Odersky2015-10-242-11/+6
| | | |
* | | | Merge pull request #887 from dotty-staging/fix-#873odersky2015-11-021-0/+10
|\ \ \ \ | | | | | | | | | | Allow pattern matching anonymous functions of arity > 1
| * | | | Also handle SAM functions when adaptiing arity of case lambdas.Martin Odersky2015-10-301-0/+6
| | | | |
| * | | | Allow pattern matching anonymous functions of arity > 1Martin Odersky2015-10-301-0/+4
| | | | | | | | | | | | | | | | | | | | This is sepcified in Sec. 8.5 of the SLS. Fixes #873. Review by @smarter.
* | | | | Add tests for wildcards without typesMartin Odersky2015-11-021-0/+2
| | | | | | | | | | | | | | | | | | | | As suggested by review.
* | | | | Parentheses around a wildcard should not produce a lambdaMartin Odersky2015-11-021-0/+24
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | `(_)` and `(_: T)` should not be converted to functions x => x (x: T) => x
* | | | Address reviewer commentsMartin Odersky2015-10-301-0/+0
| | | |
* | | | Fix #879Martin Odersky2015-10-301-0/+11
| |_|/ |/| | | | | | | | Don't insert a constructor call when typechecking Java classes.
* | | Merge pull request #886 from dotty-staging/fix-#884Guillaume Martres2015-10-306-13/+16
|\ \ \ | |/ / |/| | Fix #884 - misdiagnosed ambiguous definition.
| * | Add missing test file.Martin Odersky2015-10-301-0/+28
| | |
| * | Fix #884 - misdiagnosed ambiguous definition.Martin Odersky2015-10-296-41/+16
| | | | | | | | | | | | | | | Universal equality strikes again. Caused a bug in isDefinedInCurrentUnit.
* | | Set position on annotations parsed from JavaGuillaume Martres2015-10-291-0/+3
| | | | | | | | | | | | Fix a crash in Typer#assertPositioned
* | | Don't count suppressed errorsMartin Odersky2015-10-261-0/+9
|/ / | | | | | | If an error message was supressed to count it in the total.
* | Fix hole in subtyping of modulesMartin Odersky2015-10-251-0/+9
| | | | | | | | | | We did not handle correctly the case exemplified by `range.scala`: A module this type, which is compared with a getter to the same module. Seen in the wild in scala.math.BigDecimal.
* | Fix issue that prevented instantiating some tvars before implicit searchGuillaume Martres2015-10-251-2/+28
| |
* | Less eager tvar interpolation: wait until method calls are fully appliedGuillaume Martres2015-10-251-0/+12
| | | | | | | | Fix #738
* | Merge pull request #843 from dotty-staging/fix-#830odersky2015-10-251-0/+6
|\ \ | |/ |/| Fix #830: Compiler hangs on implicit search with singleton &/|
| * Fix #830: Compiler hangs on implicit search with singleton &/|Martin Odersky2015-10-221-0/+6
| | | | | | | | | | | | In fact we get a deep subtype recursion when compileing i830.scala. The problem goes away once we make use of the fact that the intersection of two singleton types which are not subtypes of each other is empty.
* | Merge pull request #832 from dotty-staging/fix-#815-hk-constructor-aliasDmitry Petrashko2015-10-231-0/+11
|\ \ | | | | | | Fix #815.
| * | Fix #815.Martin Odersky2015-10-201-0/+11
| | | | | | | | | | | | Need to handle hk-aliases specially in typedNew
* | | Better handling of merge errorsMartin Odersky2015-10-221-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | Instead of picking one at random, throw a MergeError which might be caught later in mergeDenot. MergeDenot has enough info to pick a simulate Scala2 linarization if the prefix comes from Scala2, or it rethrows the exception so that it becomes a type error.
* | | Merge pull request #841 from dotty-staging/fix-#831-object-selfodersky2015-10-221-0/+4
|\ \ \ | | | | | | | | Fix #831 object self