aboutsummaryrefslogtreecommitdiff
path: root/tests/pos
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1452 from dotty-staging/fix-#1432Guillaume Martres2016-08-171-0/+3
|\ | | | | Fix desugaring of Bind(WILDCARD, _).
| * Fix #1432: Fix desugaring of Bind(WILDCARD, _).Nicolas Stucki2016-08-151-0/+3
| |
* | Add passing testsMartin Odersky2016-08-1710-0/+564
| |
* | Harden copmpareHkApply for ill-typed programsMartin Odersky2016-08-172-0/+39
| | | | | | | | Turn assertion into test. Without this, neg/tcpoly_overloaded.scala fails.
* | Add clause for HKApply in TypeAssigner#avoidMartin Odersky2016-08-171-0/+27
| |
* | Merge pull request #1445 from dotty-staging/fix-#1442Dmitry Petrashko2016-08-151-0/+24
|\ \ | |/ |/| Fix #1442: add new phase, SelectStatic
| * Test that #1442 is fixed.Dmitry Petrashko2016-08-091-0/+24
| |
* | Merge pull request #1414 from dotty-staging/add-array-strawmanodersky2016-08-143-8/+37
|\ \ | | | | | | Add arrays to collection strawman
| * | Index members of a class before evaluating its parentsMartin Odersky2016-07-291-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoids missing member in tangledCompanion.scala, which is a minimization of intermittent failures in CollectionStrawMan6. Intermittent, because it depended on order of compilation. CollectionTests have to be compiled together with but before CollectionStrawMan6 (this was _sometimes_ the case because partest did not honor indicated compilation order so far). I.e. dotc CollectionTests_2.scala CollectionStrawMan6_1.scala would trigger the error. tangledCompanion.scala captures the dependencies in a single file.
| * | Move test from pos to runMartin Odersky2016-07-271-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 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.
* | | Fix #1447: Make X$ <:< X.type when X is an objectGuillaume Martres2016-08-091-0/+10
| |/ |/| | | | | This allows objects to be easily aliased
* | Add tests for infix types with wildcard parametersClemens Winter2016-08-011-0/+9
| |
* | 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 #1289 from dotty-staging/fix/partest-separateGuillaume Martres2016-07-276-45/+1
|\ \ \ | | | | | | | | partest: Enable separate compilation
| * | | Move java tests relying on type parameters to pendingGuillaume Martres2016-07-274-44/+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
* | | 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.
| * | Better test for #1181Guillaume Martres2016-07-181-0/+11
| |/ | | | | | | | | | | | | | | | | | | Now that we implement partial higher-order unification (SI-2712 fix) i1181.scala will compile even if `Alias[Int]` gets dealiased to `(Int, Int)` because we can unify the latter with `M[_]` where `M = [X] -> (Int, X)`. The new test will only succeed if `Alias[Int, Int]` is not dealiased because we will never unify `Foo[Int]` with `M[_,_]`.
* | Merge pull request #1389 from dotty-staging/fix-#1381odersky2016-07-183-0/+55
|\ \ | |/ |/| Changes to overloading
| * Make run tests for #1381.Nicolas Stucki2016-07-181-36/+0
| |
| * Add testsMartin Odersky2016-07-153-0/+39
| | | | | | | | | | | | Adds the original test form #1381. t2660 looks similar. Also adds some unrelated tests I had in the queue that now compile.
| * Additions to testMartin Odersky2016-07-151-0/+9
| |
| * Changes to overloadingMartin Odersky2016-07-151-0/+43
| | | | | | | | | | | | Fix #1381: Overloading is now changed so that we first try without implicit searches. Only if that leaves no applicable alternatives we try again with implicit search turned on. This also fixes test case t2660, which got moved from neg to pos.
* | Merge pull request #1377 from dotty-staging/#1365odersky2016-07-151-0/+13
|\ \ | | | | | | Fix 1365: Fix bindings in patterns
| * | Fix 1365: Fix bindings in patternsMartin Odersky2016-07-091-0/+13
| | | | | | | | | | | | | | | | | | We need to compare pattern types with expected types in order to derive knowledge about pattern-bound variables. This is done use the mechanism of gadt bounds.
* | | Merge pull request #1291 from nicolasstucki/implement-scala-dynamicDmitry Petrashko2016-07-151-0/+7
|\ \ \ | |_|/ |/| | Add scala.Dynamic support.
| * | Add scala.Dynamic language feature check.Nicolas Stucki2016-07-071-0/+7
| |/
* | Merge pull request #1343 from dotty-staging/change-hk-direct2odersky2016-07-1526-934/+254
|\ \ | | | | | | Direct representation of higher-kinded types
| * | Fix bounds checking of hk applied typedMartin Odersky2016-07-141-2/+32
| | | | | | | | | | | | | | | Previous logic could only handle classes as constructors. Also, address other reviewers comments.
| * | Allow hk parameters in lower boundsMartin Odersky2016-07-131-0/+11
| | |
| * | Enable test for fixed #1181: Typer should preserve aliases in TypeTreesGuillaume Martres2016-07-121-0/+12
| | | | | | | | | | | | This was fixed two commits ago.
| * | Drop restriction to 2nd order hk typesMartin Odersky2016-07-122-0/+49
| | | | | | | | | | | | Allow hk type parameters to be higher kinded themselves.
| * | Avoid dealiasing on type applicationMartin Odersky2016-07-122-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | When applying a type alias of a type lambda, keep the original application instead of reducing. But reduce anyway if - the reduced type is an application where the type constructor has the same kind as the original type constructor, or - some of the arguments are wildcards.
| * | Allow definition of new types in refinementsMartin Odersky2016-07-122-0/+54
| | | | | | | | | | | | | | | Allow definition of types in refinements that do not appear in parent type.
| * | Fix SI-2712Martin Odersky2016-07-115-2/+66
| | | | | | | | | | | | | | | Allows partially instantiated types as type constrictors when inferring higher-kinded types.