Skip to content

Adding validation tests for LazyFilterCollection and LazyMapCollection #2247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

austinzheng
Copy link
Contributor

What's in this pull request?

@gribozavr

This PR adds validation tests for LazyFilterCollection and LazyMapCollection. As a side effect, it also makes LifetimeTracked formally Comparable.

NOTE: The tests run but some of them fail. Not sure if it's because I am using the stdlib test APIs wrong or because there is an underlying bug with the new collection code, but given they only occur with one of the collection subtypes I'm inclined to believe it's the latter. I've reproduced the failing tests below:

Collection: Some tests failed, aborting
UXPASS: []
FAIL: ["LazyMapRandomAccessCollection<Array<OpaqueValue<Int>>, OpaqueValue<Int>>.Type.Index/OutOfBounds/Left/NonEmpty", "LazyMapRandomAccessCollection<Array<OpaqueValue<Int>>, OpaqueValue<Int>>.Type.Index/OutOfBounds/Left/Empty", "LazyMapRandomAccessCollection<Array<OpaqueValue<Int>>, OpaqueValue<Int>>.Type.subscript(_: Range)/OutOfBounds/Left/NonEmpty/Get", "LazyMapRandomAccessCollection<Array<OpaqueValue<Int>>, OpaqueValue<Int>>.Type.subscript(_: Range)/OutOfBounds/Left/Empty/Get", "LazyMapRandomAccessCollection<Array<LifetimeTracked>, LifetimeTracked>.Type.index(where:)/semantics", "LazyMapRandomAccessCollection<Array<LifetimeTracked>, LifetimeTracked>.Type.Index/OutOfBounds/Left/NonEmpty", "LazyMapRandomAccessCollection<Array<LifetimeTracked>, LifetimeTracked>.Type.Index/OutOfBounds/Left/Empty", "LazyMapRandomAccessCollection<Array<LifetimeTracked>, LifetimeTracked>.Type.subscript(_: Range)/OutOfBounds/Left/NonEmpty/Get", "LazyMapRandomAccessCollection<Array<LifetimeTracked>, LifetimeTracked>.Type.subscript(_: Range)/OutOfBounds/Left/Empty/Get", "LazyMapRandomAccessCollection<Array<OpaqueValue<Int>>, OpaqueValue<Int>>.Type.Index/OutOfBounds/Left/NonEmpty", "LazyMapRandomAccessCollection<Array<OpaqueValue<Int>>, OpaqueValue<Int>>.Type.Index/OutOfBounds/Left/Empty", "LazyMapRandomAccessCollection<Array<OpaqueValue<Int>>, OpaqueValue<Int>>.Type.subscript(_: Range)/OutOfBounds/Left/NonEmpty/Get", "LazyMapRandomAccessCollection<Array<OpaqueValue<Int>>, OpaqueValue<Int>>.Type.subscript(_: Range)/OutOfBounds/Left/Empty/Get", "LazyMapRandomAccessCollection<Array<LifetimeTracked>, LifetimeTracked>.Type.index(where:)/semantics", "LazyMapRandomAccessCollection<Array<LifetimeTracked>, LifetimeTracked>.Type.Index/OutOfBounds/Left/NonEmpty", "LazyMapRandomAccessCollection<Array<LifetimeTracked>, LifetimeTracked>.Type.Index/OutOfBounds/Left/Empty", "LazyMapRandomAccessCollection<Array<LifetimeTracked>, LifetimeTracked>.Type.subscript(_: Range)/OutOfBounds/Left/NonEmpty/Get", "LazyMapRandomAccessCollection<Array<LifetimeTracked>, LifetimeTracked>.Type.subscript(_: Range)/OutOfBounds/Left/Empty/Get"]
SKIP: []

Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

Triggering Swift CI

The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:

Smoke Testing

Platform Comment
All supported platforms @swift-ci Please smoke test
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
OS X platform @swift-ci Please test OS X platform
Linux platform @swift-ci Please test Linux platform

Note: Only members of the Apple organization can trigger swift-ci.

@austinzheng
Copy link
Contributor Author

@@ -60,6 +60,8 @@ extension LifetimeTracked : CustomStringConvertible {
}
}

extension LifetimeTracked : Comparable { }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought Strideable implies Comparable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. I'll fix this.

@austinzheng austinzheng force-pushed the swift-3-indexing-model branch from 382a266 to dd25a28 Compare April 20, 2016 01:03
// Test collection as random access collection using value types as elements.
CollectionTests.addRandomAccessCollectionTests (
makeCollection: { (elements: [OpaqueValue<Int>]) in
elements.lazy.map(identity)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should wrap elements into a minimal collection of appropriate kind. This will check for more issues.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are four kinds of lazy maps (sequence, forward collection, bidirectional, random access). You can get instances of each by calling the lazy map on a corresponding minimal collection or sequence. Could you add tests for all?

@gribozavr
Copy link
Contributor

I looked through the test failures and I think you will see fewer of them once you wrap the lazy collections around minimal collections.

@austinzheng
Copy link
Contributor Author

Thanks for the review! I'll have an update shortly (hopefully).

@gribozavr
Copy link
Contributor

Thanks @austinzheng! Your PR would be a great addition to our test coverage!

@austinzheng austinzheng force-pushed the swift-3-indexing-model branch from dd25a28 to bcfe02a Compare April 20, 2016 02:01
@austinzheng
Copy link
Contributor Author

austinzheng commented Apr 20, 2016

Hello @gribozavr! I've updated the PR. The new failures are:

(LazyMapCollection)
FAIL: ["Array<OpaqueValue<Int>>.Type.Index/OutOfBounds/Left/NonEmpty",
 "Array<OpaqueValue<Int>>.Type.Index/OutOfBounds/Left/Empty",
 "Array<OpaqueValue<Int>>.Type.Index/OutOfBounds/Left/NonEmpty",
 "Array<OpaqueValue<Int>>.Type.Index/OutOfBounds/Left/Empty", 
 "Array<OpaqueValue<Int>>.Type.Index/OutOfBounds/Left/NonEmpty", 
 "Array<OpaqueValue<Int>>.Type.Index/OutOfBounds/Left/Empty", 
 "Array<LifetimeTracked>.Type.index(where:)/semantics", 
 "Array<LifetimeTracked>.Type.Index/OutOfBounds/Left/NonEmpty", 
 "Array<LifetimeTracked>.Type.Index/OutOfBounds/Left/Empty", 
 "Array<LifetimeTracked>.Type.index(where:)/semantics", 
 "Array<LifetimeTracked>.Type.Index/OutOfBounds/Left/NonEmpty", 
 "Array<LifetimeTracked>.Type.Index/OutOfBounds/Left/Empty", 
 "Array<LifetimeTracked>.Type.index(where:)/semantics", 
 "Array<LifetimeTracked>.Type.Index/OutOfBounds/Left/NonEmpty", 
 "Array<LifetimeTracked>.Type.Index/OutOfBounds/Left/Empty",
 "LazyMapRandomAccessCollection<MinimalRandomAccessCollection<LifetimeTracked>, LifetimeTracked>.Type.index(where:)/semantics"]

(LazyFilterCollection)
FAIL: ["Array<OpaqueValue<Int>>.Type.Index/OutOfBounds/Left/NonEmpty",
 "Array<OpaqueValue<Int>>.Type.Index/OutOfBounds/Left/Empty", 
 "Array<OpaqueValue<Int>>.Type.Index/OutOfBounds/Left/NonEmpty", 
 "Array<OpaqueValue<Int>>.Type.Index/OutOfBounds/Left/Empty", 
 "Array<OpaqueValue<Int>>.Type.Index/OutOfBounds/Left/NonEmpty", 
 "Array<OpaqueValue<Int>>.Type.Index/OutOfBounds/Left/Empty", 
 "Array<LifetimeTracked>.Type.index(where:)/semantics", 
 "Array<LifetimeTracked>.Type.Index/OutOfBounds/Left/NonEmpty", 
 "Array<LifetimeTracked>.Type.Index/OutOfBounds/Left/Empty", 
 "Array<LifetimeTracked>.Type.index(where:)/semantics", 
 "Array<LifetimeTracked>.Type.Index/OutOfBounds/Left/NonEmpty", 
 "Array<LifetimeTracked>.Type.Index/OutOfBounds/Left/Empty", 
 "Array<LifetimeTracked>.Type.index(where:)/semantics", 
 "Array<LifetimeTracked>.Type.Index/OutOfBounds/Left/NonEmpty", "Array<LifetimeTracked>.Type.Index/OutOfBounds/Left/Empty"]

Note that the tests that are failing are configurable by passing in a configurable resiliencyChecks value. It appears the failing tests are failing because the test expects the OOB behavior to crash, so maybe I need to disable them when invoking the test function? That being said, it seems like these collections should trap if negative indices are passed to them.

Let me know if you'd like any more changes.

do {
let expected = ["convent", "conform", "constrict", "condone"]
let base = ["vent", "form", "strict", "done"]
checkSequence(expected, base.lazy.map { "con" + $0 })
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these also be wrapped?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be best if they were, yes! Then you'd only need one test, because you would not care if the elements are strings or numbers.

@gribozavr
Copy link
Contributor

@austinzheng Thanks again, I left more comments!


CollectionTests.addBidirectionalCollectionTests(
makeCollection: { (elements: [OpaqueValue<Int>]) in
MinimalCollection(elements: elements).lazy.filter { _ in return true }
Copy link
Contributor Author

@austinzheng austinzheng Apr 21, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also technically invalid. A MinimalCollection is not a BidirectionalCollection. It's almost certainly the same issue we discussed above with Sequence and addCollectionTests. My updated diff (coming soon) with gyb should fix this.

@austinzheng austinzheng force-pushed the swift-3-indexing-model branch from bcfe02a to 95fdcf7 Compare April 21, 2016 01:07
% for (specifier, kind) in variations:
CollectionTests.add${specifier}${kind}Tests(
make${kind}: { (elements: [OpaqueValue<Int>]) in
Minimal${specifier}${kind}(elements: elements).lazy.filter { _ in return true }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the update!

Given the diagnosis in https://bugs.swift.org/browse/SR-1278, we can't really tell which overload is being called here (after all, Array is a bidirectional collection). To make sure, could you add an explicit return type to closures in these tests?

@austinzheng austinzheng force-pushed the swift-3-indexing-model branch from 95fdcf7 to 6d78942 Compare April 21, 2016 01:17
// Test collections using value types as elements.
% for (traversal, kind) in variations:
CollectionTests.add${traversal}${kind}Tests(
make${kind}: { (elements: [OpaqueValue<Int>]) -> Minimal${traversal}${kind}<[OpaqueValue<Int>]> in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it something like ... -> LazyFilterCollection<Minimal${traversal}${kind}<[OpaqueValue<Int>]>>?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. I screwed this type signature up and it doesn't compile. Fixing...

@austinzheng
Copy link
Contributor Author

@gribozavr Unfortunately I have to head out now. I'll work on this some more tonight and will ping you when it's ready; it'll definitely be done by tomorrow morning. There is an issue where the various checkXCollection functions all have different signatures.

@austinzheng
Copy link
Contributor Author

austinzheng commented Apr 21, 2016

I'm finding it impossible to get (edited: some of) of the Filter tests to typecheck properly (note that this only occurs with the bidirectional collection test case):

CollectionTests.addBidirectionalCollectionTests(
  makeCollection: { (elements: [LifetimeTracked]) -> LazyFilterCollection<MinimalBidirectionalCollection<LifetimeTracked>> in
    MinimalBidirectionalCollection(elements: elements).lazy.filter { _ in return true }
  },
  wrapValue: { (element: OpaqueValue<Int>) -> LifetimeTracked in
    LifetimeTracked(element.value, identity: element.identity)
  },
  extractValue: { (element: LifetimeTracked) -> OpaqueValue<Int> in
    OpaqueValue(element.value, identity: element.identity)
  },
  makeCollectionOfEquatable: { (elements: [LifetimeTracked]) -> LazyFilterCollection<MinimalBidirectionalCollection<LifetimeTracked>> in
    MinimalBidirectionalCollection(elements: elements).lazy.filter { _ in return true }
  },
  wrapValueIntoEquatable: { (element: MinimalEquatableValue) -> LifetimeTracked in
    LifetimeTracked(element.value, identity: element.identity)
  },
  extractValueFromEquatable: { (element: LifetimeTracked) -> MinimalEquatableValue in
    MinimalEquatableValue(element.value, identity: element.identity)
  }
)

I don't get any compiler error messages. Instead, I get the following:

Exit Code: 254

Command Output (stdout):
--
Assertion failed: ((conforms || replacement->is<ErrorType>() || firstArchetype->getIsRecursive() || isOpenedAnyObject(replacement) || replacement->is<GenericTypeParamType>()) && "Constraint system missed a conformance?"), function computeSubstitutions, file /Users/austinzheng/Developer/Swift/swift/lib/Sema/CSApply.cpp, line 148.
0  swift                    0x000000010b9945bb llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1  swift                    0x000000010b9937e6 llvm::sys::RunSignalHandlers() + 70
2  swift                    0x000000010b994e11 SignalHandler(int) + 641
3  libsystem_platform.dylib 0x00007fff95aee52a _sigtramp + 26
4  swift                    0x000000010c43b320 FirstTarget + 71016
5  swift                    0x000000010b994ae6 abort + 22
6  swift                    0x000000010b994ac1 __assert_rtn + 81
7  swift                    0x00000001093e81be swift::constraints::Solution::computeSubstitutions(swift::Type, swift::DeclContext*, swift::Type, swift::constraints::ConstraintLocator*, llvm::SmallVectorImpl<swift::Substitution>&) const + 2030
8  swift                    0x00000001093eeb40 (anonymous namespace)::ExprRewriter::buildMemberRef(swift::Expr*, swift::Type, swift::SourceLoc, swift::ValueDecl*, swift::DeclNameLoc, swift::Type, swift::constraints::ConstraintLocatorBuilder, swift::constraints::ConstraintLocatorBuilder, bool, swift::AccessSemantics, bool) + 576
9  swift                    0x00000001093faf7b swift::ASTVisitor<(anonymous namespace)::ExprRewriter, swift::Expr*, void, void, void, void, void>::visit(swift::Expr*) + 21259
10 swift                    0x00000001093ed875 (anonymous namespace)::ExprRewriter::walkToExprPost(swift::Expr*) + 21
11 swift                    0x000000010958ac9c swift::Expr::walk(swift::ASTWalker&) + 76
12 swift                    0x00000001093ea12c swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 476
13 swift                    0x0000000109486314 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 708
14 swift                    0x000000010940ea40 (anonymous namespace)::FailureDiagnosis::typeCheckChildIndependently(swift::Expr*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<TCCFlags, unsigned int>, swift::ExprTypeCheckListener*) + 928
15 swift                    0x000000010941a6fe (anonymous namespace)::FailureDiagnosis::visitApplyExpr(swift::ApplyExpr*) + 46
16 swift                    0x0000000109409a89 swift::ASTVisitor<(anonymous namespace)::FailureDiagnosis, bool, void, void, void, void, void>::visit(swift::Expr*) + 169
17 swift                    0x0000000109404be9 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 105
18 swift                    0x0000000109409499 swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 3977
19 swift                    0x00000001094806e9 swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 809
20 swift                    0x000000010948628a swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 570
21 swift                    0x00000001094fa145 swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void>::visit(swift::Stmt*) + 549
22 swift                    0x00000001094f9b9c swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 140
23 swift                    0x00000001094ba9bc swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1308
24 swift                    0x0000000109249325 swift::CompilerInstance::performSema() + 4853
25 swift                    0x0000000108c2a4d9 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 425
26 swift                    0x0000000108c2947f frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2879
27 swift                    0x0000000108c2497d main + 2637
28 libdyld.dylib            0x00007fff9c7a95ad start + 1
Stack dump:
0.  Program arguments: /Users/austinzheng/Developer/Swift/build/Ninja-ReleaseAssert/swift-macosx-x86_64/bin/swift -frontend -c -primary-file /Users/austinzheng/Developer/Swift/build/Ninja-ReleaseAssert/swift-macosx-x86_64/validation-test-macosx-x86_64/stdlib/Collection/Output/LazyFilterCollection.swift.gyb.tmp/main.swift -target x86_64-apple-macosx10.9 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/../../../Developer/Library/Frameworks -module-cache-path /var/folders/k_/btpchdwj4fg0qcck6g438kjm0000gn/T/swift-testsuite-clang-module-cacheifXOko -module-name main -o /var/folders/k_/btpchdwj4fg0qcck6g438kjm0000gn/T/main-f7a56e.o 

Leaving out the return type annotations for the makeCollection and makeCollectionOfEquatable causes the compiler to infer the return type as a plain Array of some sort. (More specifically, instead of LazyFilterCollection<MinimalCollection<T>>, the type is inferred as [T].) I'm a little mystified by this behavior.

I'm going to be out for the next few days but I'll try to find a computer to finish this up from. In the meantime, any insight would be welcome.

@austinzheng austinzheng force-pushed the swift-3-indexing-model branch from 6d78942 to a9e9a29 Compare April 21, 2016 08:19
@austinzheng
Copy link
Contributor Author

I've updated the PR with everything I have so far, but the Filter tests won't build properly yet and the PR shouldn't be merged until the issue is fixed.

@gribozavr
Copy link
Contributor

@austinzheng To try to work around the compiler bug, could you try breaking out closures into stand-alone functions?

@austinzheng
Copy link
Contributor Author

@gribozavr I tried defining the closures separately, as local variables, and wrapping everything in a do block, but it didn't help. I can try making them full-fledged functions.

@austinzheng
Copy link
Contributor Author

I tried making the closures full functions and passing in function references, but it didn't do anything. I'll think about this some more.

@austinzheng
Copy link
Contributor Author

@gribozavr I was thinking: since this problem only occurs with the BidirectionalCollection version of the test, maybe I can dummy out the BidirectionalCollection variant of the test using GYB and insert a FIXME for when the issue is worked out. Let me know if you think that's an acceptable option.

@gribozavr
Copy link
Contributor

@austinzheng Absolutely it makes sense to unblock you and leave a FIXME.

@gribozavr
Copy link
Contributor

@austinzheng Actually, your test found a bug: LazyFilterCollection does not conform to BidirectionalCollection, the compiler just can't produce an error message in that case.

Do you want to work on gyb'ing the two implementations?

@gribozavr
Copy link
Contributor

@austinzheng I'm on it.

@austinzheng
Copy link
Contributor Author

Thanks. Unfortunately I won't have access tp a computer until tomorrow night.

Once this is in I'd like to work on improving the filter tests with pseudorandom data. That is probably best as a follow up PR. Let me know what you think.

@gribozavr
Copy link
Contributor

@austinzheng I have added LazyFilterBidirectionalCollection. Could you rebase to current state of swift-3-indexing-model and apply the following patch:

diff --git a/validation-test/stdlib/Collection/LazyFilterCollection.swift.gyb b/validation-test/stdlib/Collection/LazyFilterCollection.swift.gyb
index 40ebaf5..77d455c 100644
--- a/validation-test/stdlib/Collection/LazyFilterCollection.swift.gyb
+++ b/validation-test/stdlib/Collection/LazyFilterCollection.swift.gyb
@@ -19,13 +19,13 @@ variations = [('', 'Sequence'), ('', 'Collection'), ('Bidirectional', 'Collectio
 // Test collections using value types as elements.
 % for (traversal, kind) in variations:
 CollectionTests.add${traversal}${kind}Tests(
-  make${kind}: { (elements: [OpaqueValue<Int>]) -> LazyFilter${kind}<Minimal${traversal}${kind}<OpaqueValue<Int>>> in
+  make${kind}: { (elements: [OpaqueValue<Int>]) -> LazyFilter${traversal}${kind}<Minimal${traversal}${kind}<OpaqueValue<Int>>> in
     // FIXME: create a better sequence and filter
     Minimal${traversal}${kind}(elements: elements).lazy.filter { _ in return true }
   },
   wrapValue: identity,
   extractValue: identity,
-  make${kind}OfEquatable: { (elements: [MinimalEquatableValue]) -> LazyFilter${kind}<Minimal${traversal}${kind}<MinimalEquatableValue>> in
+  make${kind}OfEquatable: { (elements: [MinimalEquatableValue]) -> LazyFilter${traversal}${kind}<Minimal${traversal}${kind}<MinimalEquatableValue>> in
     // FIXME: create a better sequence and filter
     Minimal${traversal}${kind}(elements: elements).lazy.filter { _ in return true }
   },
@@ -37,7 +37,7 @@ CollectionTests.add${traversal}${kind}Tests(
 // Test collections using reference types as elements.
 % for (traversal, kind) in variations:
 CollectionTests.add${traversal}${kind}Tests(
-  make${kind}: { (elements: [LifetimeTracked]) -> LazyFilter${kind}<Minimal${traversal}${kind}<LifetimeTracked]>> in
+  make${kind}: { (elements: [LifetimeTracked]) -> LazyFilter${traversal}${kind}<Minimal${traversal}${kind}<LifetimeTracked>> in
     // FIXME: create a better sequence and filter
     Minimal${traversal}${kind}(elements: elements).lazy.filter { _ in return true }
   },
@@ -47,7 +47,7 @@ CollectionTests.add${traversal}${kind}Tests(
   extractValue: { (element: LifetimeTracked) in
     OpaqueValue(element.value, identity: element.identity)
   },
-  make${kind}OfEquatable: { (elements: [LifetimeTracked]) -> LazyFilter${kind}<Minimal${traversal}${kind}<LifetimeTracked>> in
+  make${kind}OfEquatable: { (elements: [LifetimeTracked]) -> LazyFilter${traversal}${kind}<Minimal${traversal}${kind}<LifetimeTracked>> in
     // FIXME: create a better sequence and filter
     Minimal${traversal}${kind}(elements: elements).lazy.filter { _ in return true }
   },

This will make your test compile.

@gribozavr
Copy link
Contributor

@austinzheng We have merged the swift-3-indexing-model branch, could you reopen a new PR for master?

@gribozavr gribozavr closed this Apr 27, 2016
@austinzheng
Copy link
Contributor Author

@gribozavr I'll open a new PR tonight when I get back home. Thanks for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants