aboutsummaryrefslogtreecommitdiff
path: root/tests/pos
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1492 from dotty-staging/add-inlineGuillaume Martres2016-10-061-5/+5
|\ | | | | Implement inline
| * Add InlineBytecodeTests to check that inline really worksGuillaume Martres2016-10-051-7/+0
| |
| * Add test caseMartin Odersky2016-10-051-0/+7
| |
| * Make inline a keywordMartin Odersky2016-10-021-5/+5
| | | | | | | | | | | | | | `inline` is now a modifier keyword. To keep disruption tolerable, we still allow `@inline` as an annotation as well. Other uses of `inline` are supported only under `-language:Scala2` and are rewritten to identifiers in backticks.
* | Merge pull request #1494 from martijnhoekstra/wintestsFelix Mulder2016-10-0628-0/+0
|\ \ | |/ |/| [WIP] fix encoding issues
| * honor -encoding compiler flag and defaultsMartijn Hoekstra2016-09-0728-0/+0
| | | | | | | | | | | | | | | | | | rename test/pos/valueclasses to pos_valueclasses tests/pos/valueclasses generates a valueclasses.flags file in /tests/partest-generated/pos that conflicts with the valueClasses.flags file that tests/neg/valueClasses.scala tries to create
* | Merge pull request #1465 from dotty-staging/fix-#1457odersky2016-09-162-0/+17
|\ \ | | | | | | Fix #1457: Three incompatbilities with scalac
| * | Fix #1457: Three incompatbilities with scalacMartin Odersky2016-08-232-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | Two of these are unavoidable. I moved the tests to diabled/not-representable and added in each case a comment to the main scala file detailing why there is a deviation. The last one (import-rewrite) is fixed.
* | | Merge pull request #1514 from OlivierBlanvillain/fix-1513odersky2016-09-162-0/+61
|\ \ \ | | | | | | | | Fix #1513: misaligned by name type parameter type bounds
| * | | Fix corner case w types ALL passed by name & out of orderOlivier Blanvillain2016-09-161-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit removes a problematic duplicated `checkBounds` call on `TypeApply`. To verify correctness of this change on has to check that `normalizeTree` used only once [1], and the function using `normalizeTree` already takes care of calling `checkBounds`. [1]: https://github.com/lampepfl/dotty/blob/0e8f05d88bfef95fac59f522fd9d06792126bd11/src/dotty/tools/dotc/transform/PostTyper.scala#L205
| * | | Fix #1513: misaligned by name type parameter type boundsOlivier Blanvillain2016-09-152-0/+52
| | | |
* | | | Allow try expression without catch or finally, issue warningFelix Mulder2016-09-151-0/+7
| | | |
* | | | Move t1335 test from /pos to /runOlivier Blanvillain2016-09-151-11/+0
|/ / /
* | | Merge pull request #1499 from OlivierBlanvillain/fix-1335Felix Mulder2016-09-141-0/+11
|\ \ \ | | | | | | | | Fix #1335: Generate null checks for extractors
| * | | Fix #1335: Generate null checks for extractorsOlivier Blanvillain2016-09-081-0/+11
| | |/ | |/|
* / | Partially fix #1500: Implicit search breaks at a certain depthOlivier Blanvillain2016-09-131-0/+28
|/ / | | | | | | | | | | The issue fixed here was introduced by 71027f15. The added `csyms.isEmpty` condition on `case nil =>` is always true, which is clearely a bug. t1500c still fails with covariant (or contravariant) type parameters on `::`, but this seams to be a more complicated issue involving the typer.
* | Handle case where expected type of a SeqLiteral has an undetermined element ↵Martin Odersky2016-08-261-0/+54
| | | | | | | | | | | | type. Test case is isApplicableSafe -Ycheck:first.
* | Dependent method testsMartin Odersky2016-08-262-0/+22
| |
* | Make inherited inferred result type work for dependent methodsMartin Odersky2016-08-261-0/+12
| | | | | | | | We did not properly rename parameter references before.
* | Relax matching requirement in unApplyMartin Odersky2016-08-261-0/+6
| | | | | | | | | | | | We now always widen selector type to the superclass if necessary, no matter whether the selector type refers to a trait or a proper class.
* | Generalize self-referential member comparisons.Martin Odersky2016-08-261-0/+4
| | | | | | | | | | | | | | The special case in hasMatchingMember dealing with self-refential members has to be generalized to deal lower and upper bounds. Test case is t762.scala
* | Type annotations in context enclosing the annotated definitionMartin Odersky2016-08-261-0/+3
| | | | | | | | Fixes SI-7426, which caused a double definition before.
* | Drop out of date commentMartin Odersky2016-08-261-1/+1
| |
* | Implement alternative desugaring of for-if to filter.Martin Odersky2016-08-261-0/+12
| | | | | | | | | | | | | | Fallback to .filter if a .withFilter is not available, but do this only for .withFilter calls generated from for expressions (this is different from what scalac does; the latter can also rewrite .withFilter calls given in source, which is not desirable.
* | Recategorize testsMartin Odersky2016-08-2636-0/+751
| | | | | | | | | | | | | | | | | | Passing tests from pending/pos go in pos. Some others go in diabled/not-testable. These are tests that require a compilation order which we cannot yet do with our unit testing framework. Compiling them alltogether (as is now doen in junit) does not work either for them because they contain a duplicate class.
* | GADT testMartin Odersky2016-08-261-0/+25
| | | | | | | | | | This one failed in getters before because a (previously unchecked) assignment was turned into a checked application. Now it passes.
* | Merge pull request #1460 from dotty-staging/fix-t1756odersky2016-08-261-0/+33
|\ \ | |/ |/| Make sure arguments are evaluated in the correct typer state.
| * Make sure arguments are evaluated in the correct typer state.Martin Odersky2016-08-211-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a tricky interaction with caching of typed arguments in FunProto types and backtracking using different typer states. We might end up with a typed argument that is evaluated in one typer state and that is used in another. The problem is that the argument typing might have inserted type variables (maybe by adding polymorphic implicit views) that are not registered in the typer state in which the application is finally typed. In that case we will see an "orphan poly parameter" in pickling. The fix is to discard argument types is their typerstate is not committed to the one in which the application is finally typed. To apply the fix we need to track - for typer states: whether or not it was committed, and what its parent is. - for function prototypes: the typer state in which an argument with cached type was evaluated. Test case is t1756.scala, which produced an "orphan poly parameter CI" before.
* | Merge pull request #1456 from dotty-staging/fix-#1444odersky2016-08-211-0/+14
|\ \ | |/ |/| Fix #1444: Pass implicits to parameterless traits if needed
| * Fix #1444: Add implicit arguments to supertraitsMartin Odersky2016-08-201-0/+14
| | | | | | | | | | | | | | | | If a super trait is given as a type (i.e. no argument list), implicit args were not passed. This is fixed now. Also, we now check for parameterized traits lacking type arguments in Typer instead of in Mixin. Fixes #1444.
* | Merge pull request #1459 from dotty-staging/tests3odersky2016-08-211-0/+76
|\ \ | | | | | | Refinements to auto-tupling
| * | Address reviewers comments.Martin Odersky2016-08-211-4/+2
| | |
| * | Refinements to auto tuplingMartin Odersky2016-08-181-0/+78
| |/ | | | | | | | | | | | | | | | | | | There's a nasty interaction with auto-tupling and trying to insert an implicit on the qualifier of a call. If the original call fails, we need to "undo" any auto-tupling decisions in calls where an implicit is inserted on the qualifier. Also: Needed to fix canAutoTuple test so that Scala2 feature is checked instead of dotty's. Also: Drop features in dotty.language that duplicate those in scala.language.
* / Fixes in comparisons between singleton typesMartin Odersky2016-08-181-0/+16
|/ | | | | Needed to address problem shown by z1720.scala. Another fix to avoidance is needed to make it pass completely.
* 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
| | |