You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
swift-ci opened this issue
Jan 4, 2017
· 6 comments
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of software
Apple Swift version 2.2 (swiftlang-703.0.18.8 clang-703.0.31)
Target: x86_64-apple-macosx10.9
System Version: OS X 10.11.6 (15G1212)
Kernel Version: Darwin 15.6.0
Boot Mode: Normal
Secure Virtual Memory: Enabled
System Integrity Protection: Enabled
// ==================================// Reporting// ==================================// An interface for a generic reporting class.// Just allows writing to some unknown backend.protocolReporting
{
funcwrite(outputText: String)
}
/*! A reporter class that writes its output to the console log via NSLog Adopts the Reporting protocol*/publicclassConsoleLogReporter : Reporting
{
publicfuncwrite(outputText: String)
{
// NSLog("%@", outputText)
}
}
// ==================================// Streaming// ==================================//protocolStreaming
{
associatedtypekeyTypeassociatedtypevalueTypefuncwrite(key: keyType, value: valueType )
}
classStreamingC<keyType, valueType> : Streaming
{
funcwrite(key: keyType, value: valueType )
{
print("This method needs to be implemented by subclasses.")
}
}
// ==================================// TupleStreamer// ==================================//classTupleStreamer : StreamingC<Int, (Int, Int)>
{
vartupleArray: [(Int,(Int, Int))]
funcwrite( tuple: (Int,(Int,Int)) )
{
let (key, value) = tupleself.write(key, value:value)
}
overridefuncwrite(key: Int, value: (Int, Int) )
{
tupleArray.append( (key, value) )
}
overrideinit()
{
tupleArray = []
}
}
classMapReduce<InputKeyType, InputValueType, OutputKeyType, OutputValueType>
{
/* Applications can use the Reporter to report progress, set application-level status messages and update Counters, or just indicate that they are alive. */typealiasreporterType = Reporting/* Maps are the individual tasks that transform input records into intermediate records. The transformed intermediate records do not need to be of the same type as the input records. A given input pair may map to zero or many output pairs. Output pairs do not need to be of the same types as input pairs. */typealiasmapperType = (inputKey:InputKeyType, inputValue:InputValueType) -> (OutputKeyType, OutputValueType)
//(OutputKeyType, OutputValueType)/* Output pairs are collected with calls to collect. */typealiascollectorType = (outputKey:OutputKeyType, outputValue:OutputValueType, Stream: StreamingC<OutputKeyType, OutputValueType>? ) -> StreamingC<OutputKeyType, OutputValueType>
/* Perform local aggregation of the intermediate outputs, which helps to cut down the amount of data transferred from the Mapper to the Reducer. */typealiascombinerType = (Stream: StreamingC<OutputKeyType, OutputValueType> ) -> StreamingC<OutputKeyType, OutputValueType>
/* All intermediate values associated with a given output key are subsequently grouped and passed to the Reducer(s) to determine the final output */typealiasreducerType = ( key: OutputKeyType, value: OutputValueType, reporter: Reporting) -> BooltypealiasinputFormatType = [(Int,Int)]
typealiasrecordReaderFunc = ( inputData: inputFormatType ) -> (InputKeyType, InputValueType)
varinputKey: InputKeyTypevarinputValue: InputValueTypevarmapFunc: mapperTypevarreduceFunc: reducerTypevarreporter: reporterType = ConsoleLogReporter()
varcollectorFunc: collectorTypeinit( inReporter: Reporting )
{
self.reporter = inReporter
}
}
funcTestMR()
{
typealiasinputKeyType = InttypealiasinputValueType = [(Int, Int)]
typealiasoutputKeyType = InttypealiasoutputValueType = (Int,Int)
letvalues : inputValueType = [ (13, 10), (14, 10), (11, 09), (16, 15), (14, 13), (15, 13), (13, 09), (13, 09) ]
letmr = MapReduce<inputKeyType, inputValueType, outputKeyType, outputValueType> (
inReporter: ConsoleLogReporter()
)
}
when it's looking at the same method if it isn't an override. But in both cases, getFlattenedValueCount sees the substituted argument type as a TupleType and returns 2, so claimParams() ends up trying to consume 2 params.
To me, "resolved" is the state where the originator can verify your fix. That's not really true (without undue burden) until the corresponding PR is merged.
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of software
Environment
Apple Swift version 2.2 (swiftlang-703.0.18.8 clang-703.0.31)
Target: x86_64-apple-macosx10.9
System Version: OS X 10.11.6 (15G1212)
Kernel Version: Darwin 15.6.0
Boot Mode: Normal
Secure Virtual Memory: Enabled
System Integrity Protection: Enabled
Additional Detail from JIRA
md5: c2f1fd613921369a915bb796c648e430
Issue Description:
Here is the compiler output:
The text was updated successfully, but these errors were encountered: