aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Tweaks to strawmanMartin Odersky2016-07-282-92/+112
| | | | | | | | | | | | | | | | | | | | | - Add proper :: to lists - Move some methods to IterableOps in order to keep Iterable clean - Rename knownLength to knownSize - Add some implentations for performance and completeness
| * | Make colltest6 self-containedMartin Odersky2016-07-272-1/+2
| | | | | | | | | | | | Following the other colltests, put each in a separate package.
| * | Move test from pos to runMartin Odersky2016-07-271-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test generated code before but fails with verify error at runtime. Here's the message: Exception in thread "main" java.lang.VerifyError: Bad type on operand stack Exception Details: Location: D$.<init>()V @2: invokedynamic Reason: Type uninitializedThis (current frame, stack[1]) is not assignable to 'D$' Current Frame: bci: @2 flags: { flagThisUninit } locals: { uninitializedThis } stack: { uninitializedThis, uninitializedThis } Bytecode: 0x0000000: 2a2a ba00 1f00 00b7 0022 2ab3 0024 b1 at Test$.main(t3048.scala:13) at Test.main(t3048.scala) With the fix in last commit, test causes backend to crash with java.lang.AssertionError: assertion failed: val <none> at scala.Predef$.assert(Predef.scala:165) at scala.tools.nsc.backend.jvm.BCodeHelpers$BCInnerClassGen$class.assertClassNotArray(BCodeHelpers.scala:214) at scala.tools.nsc.backend.jvm.BCodeHelpers$BCInnerClassGen$class.assertClassNotArrayNotPrimitive(BCodeHelpers.scala:219) at scala.tools.nsc.backend.jvm.BCodeHelpers$BCInnerClassGen$class.getClassBTypeAndRegisterInnerClass(BCodeHelpers.scala:238) at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.getClassBTypeAndRegisterInnerClass(BCodeSkelBuilder.scala:51) at scala.tools.nsc.backend.jvm.BCodeHelpers$BCInnerClassGen$class.internalName(BCodeHelpers.scala:210)
| * | Fix problem related to cbn parameters in supercallsMartin Odersky2016-07-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The closures generated by elimByName did not get the InSuperCall flag set. This caused problems in lambda lift which led to a verify error for the new version CollectionStrawMan6. That version replaces explicit function parameters in class LazyList by by-name parameters. Also: Clarify logic for liftLocals in LambdaLift (liftLocals caused the immediate problem but was in the end not to blame).
| * | Rename fromLikeIterable -> fromIterableWithSameElemTypeMartin Odersky2016-07-272-24/+24
| | | | | | | | | | | | Makes it clearer what it is. Also, fixed check file.
| * | Fix substDealiasMartin Odersky2016-07-271-0/+11
| | | | | | | | | | | | | | | | | | substDealias did not follow aliases when the prefix of a typeref changed under substitution. This was exhibited by a bug in extensionMethods which was first discovered in CollectionStrawMan6 and was minimized in extmethods.
| * | Improve dropMartin Odersky2016-07-271-10/+3
| | | | | | | | | | | | | | | By making LinearSeq an IterableLike, we can use tail-recursion on drop.
| * | Further extension with LazyListMartin Odersky2016-07-263-105/+594
| | | | | | | | | | | | | | | Demonstrates how to integrate lazy non-view collections in the framework.
| * | Add arrays to collection strawmanMartin Odersky2016-07-253-0/+912
| | | | | | | | | | | | | | | This PR investigates what it takes to extend CollectionStrawMan5 to arrays.
* | | Fix #1447: Make X$ <:< X.type when X is an objectGuillaume Martres2016-08-091-0/+10
| |/ |/| | | | | This allows objects to be easily aliased
* | Merge pull request #1436 from cswinter/wip-repl-patdef-fixGuillaume Martres2016-08-071-0/+10
|\ \ | | | | | | Fix #1372: Add handler for `PatDef`s to REPL
| * | Fix #1372: Add handler for `PatDef`s to REPLClemens Winter2016-08-021-0/+10
| | |
* | | Fix #1367: Add ParsedTry case to UntypedTree{Copier,Map,Accumulator}Clemens Winter2016-08-031-0/+3
| | |
* | | Merge pull request #1431 from cswinter/wip-unboundwildcardodersky2016-08-012-0/+30
|\ \ \ | |/ / |/| | Fix #1396, #1403: Properly handle unbound wildcard types
| * | Add tests for infix types with wildcard parametersClemens Winter2016-08-011-0/+9
| | |
| * | Add tests for unbound wildcard typesClemens Winter2016-08-011-0/+21
| | |
* | | Merge pull request #1429 from dotty-staging/fix-#1426Guillaume Martres2016-08-011-0/+8
|\ \ \ | |/ / |/| | Fix #1426: Fix varable printing in REPL
| * | Fix varable printing in REPLMartin Odersky2016-07-311-0/+8
| | | | | | | | | | | | | | | | | | We accidentally used `toString` instead of `show`. Fixes #1426.
* | | Merge pull request #1398 from dotty-staging/fix-#1269Dmitry Petrashko2016-07-311-0/+16
|\ \ \ | |/ / |/| | Fix #1269: Typing and pattern matching of nested subclasses
| * | Fix outer test in pattern matcherMartin Odersky2016-07-171-0/+16
| | | | | | | | | | | | | | | Previous test did not reflect deeper paths for outer references. This caused a -Ycheck:patMat failure for i1269.scala.
* | | Fix #1285: Mutable vars are not to be considered constantMartin Odersky2016-07-311-0/+4
| | |
* | | Merge pull request #1115 from dotty-staging/ensure-bootstrapped-partestodersky2016-07-312-0/+16
|\ \ \ | | | | | | | | Ensure that partest runs bootstrapped Dotty.
| * | | Add check fileMartin Odersky2016-07-281-0/+2
| | | |
| * | | Add test file.Martin Odersky2016-07-281-0/+14
| | | |
* | | | Fix #1423: Fix owners of called methods in CollectSuperCalls.Nicolas Stucki2016-07-292-0/+25
| | | |
* | | | Merge pull request #1410 from dotty-staging/fix-#1263Dmitry Petrashko2016-07-281-0/+34
|\ \ \ \ | |/ / / |/| | | Fix #1263: Suppress super initializer call for val parameters of traits.
| * | | Extend test case to test variations of modifiers on trait parameters.Martin Odersky2016-07-251-0/+24
| | | |
| * | | Fix #1263: Suppress super initializer call for val parameters of traits.Martin Odersky2016-07-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Val-parameters of traits don't have an initializer, as other vals do. So we cannot call the initializer in an initialization sequence of a subclass. Fixes #1263.
* | | | Merge pull request #1289 from dotty-staging/fix/partest-separateGuillaume Martres2016-07-2710-5/+7
|\ \ \ \ | | | | | | | | | | partest: Enable separate compilation
| * | | | Fix colltest4: ListBuffer[A]#fromIterable had an incorrect castFelix Mulder2016-07-271-1/+1
| | | | |
| * | | | Move java tests relying on type parameters to pendingGuillaume Martres2016-07-274-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the classfiles emitted by dotty do not contain the type parameters information that javac relies on. Fixing this is tracked by #1303.
| * | | | pos/java-interop/volatile: Fix compilation with javacGuillaume Martres2016-07-271-0/+0
| | | | | | | | | | | | | | | | | | | | javac wants the public class name to match the filename.
| * | | | Remove overloaded constructor for annotationsGuillaume Martres2016-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lead to inference failures when separately compiling t1751 and t294, this did not happen under joint compilation because JavaParser does not create the overloaded constructor
| * | | | Fix colltest5 test under separate compilationGuillaume Martres2016-07-274-3/+5
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test failed before because strawman.collections.CollectionStrawMan5 is defined in two places: - src/strawman/collections/CollectionStrawMan5.scala - tests/run/colltest5/CollectionStrawMan5_1.scala The first will be compiled by scalac (unless the tests are run through a bootstrapped dotty) and the second will be compiled by dotty, the value class encoding of scalac and dotty are not binary compatible. This would not be a problem if we always used the `CollectionStrawMan5` coming from the partest output directory and ignored the one in the dotty sources, but which one gets picked depends on the classpath and whether compilation is joined or separate, see #1301. For now, it's safer and simpler to just avoid having tests which define a class that is also defined in the sources of dotty. Also, fix a bug in colltest4 where it was importing CollectionStrawMan5 instead of CollectionStrawMan4
* | | | Merge pull request #1415 from dotty-staging/fix-i1354odersky2016-07-272-0/+33
|\ \ \ \ | | | | | | | | | | fix #1354: improve type test of union types
| * | | | fix #1354: improve type test and typecast of union typesliu fengyun2016-07-262-0/+33
| |/ / /
* | | | Merge pull request #1412 from dotty-staging/fix-#1284odersky2016-07-261-0/+8
|\ \ \ \ | | | | | | | | | | Fix #1284: Make classTag depend directly on erasure
| * | | | Fix #1284: Make classTag depend directly on erasureMartin Odersky2016-07-251-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the end, a classTag reflects the erased version of a type. The only condition for its generation should be that the erasure is stable under possible instantiations.
* | | | | Merge pull request #1409 from dotty-staging/fix-hk-typdefs-of-lambdasGuillaume Martres2016-07-251-0/+21
|\ \ \ \ \ | |_|/ / / |/| | | | Fix parameterized typedefs with lambdas as rhs
| * | | | Take curried type lambdas into accountMartin Odersky2016-07-221-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Adapt operations TypeApplications and TypeComparer to account for the possibilities of curried type lambdas.
| * | | | Fix parameterized typedefs with lambdas as rhsMartin Odersky2016-07-221-0/+9
| | |/ / | |/| | | | | | | | | | | | | | | | | | Previously the compiler crashed when faced with a parameterized typedef that has a lambda as rhs. We fix this by refining the condition when not to abstract in typeDefsig.
* | | | Adress reviewers commentsMartin Odersky2016-07-251-1/+1
| | | |
* | | | Fix #1385: Temporarily lift 22 limit for functionsMartin Odersky2016-07-251-0/+7
| |/ / |/| |
* | | Fix #1401: Make sure all refs are forwardedMartin Odersky2016-07-211-0/+25
|/ / | | | | | | | | | | | | | | | | | | | | | | Faced with recursive dependencies through self types, we might have to apply `normalizeToClassRefs` to a class P with a parent that is not yet initialized (witnessed by P's parents being Nil). In that case we should still execute forwardRefs on P, but we have to wait in a suspension until P is initialized. This avoids the problem raised in #1401. I am still not quite sure why forwardRefs is needed, but it seems that asSeenFrom alone is not enough to track the dependencies in this case.
* | Merge pull request #1395 from dotty-staging/fix-#1378odersky2016-07-211-0/+3
|\ \ | | | | | | Fix #1378: Propagate more knowledge of result type into applications
| * | Proparage function result constrains when inferring parameter typesMartin Odersky2016-07-161-0/+3
| |/ | | | | | | | | | | | | | | If an application has functions with implicit parameter types we need to be more aggressive about propagating knowledge of the expected result type into the constraint. Fixes #1378.
* | Merge pull request #1402 from dotty-staging/fix-wildcard-protosGuillaume Martres2016-07-191-0/+11
|\ \ | | | | | | Fix wildcard protos
| * | Add test caseMartin Odersky2016-07-191-0/+11
| | |
* | | Merge pull request #1400 from dotty-staging/fix/hk-reduce-typerefsodersky2016-07-192-0/+22
|\ \ \ | |/ / |/| | HK reduction: Remove special-case for typerefs
| * | HK reduction: Remove special-case for typerefsGuillaume Martres2016-07-181-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The special case: case stripped: TypeRef => stripped.symbol.is(BaseTypeArg) is wrong because you might still want to reduce applications involving TypeRefs which are not base class parameters, like in: class Foo[A] type Alias[X] = Foo[X] val x: Alias[Int] = ??? `Alias` is a TypeRef so before this commit `Alias[Int]` was never reduced to `Foo[Int]`. It should have been: case stripped: TypeRef if stripped.symbol.is(BaseTypeArg) => true But even this is incorrect: it assumes that we can always safely reduce HK applications involving base class parameters, this is not the case when the parameter kind is different from the rhs kind as illustrated by `i1181c.scala`. We fix this by simply dropping the special case.