swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.49k stars 10.35k forks source link

[SR-15450] Compilation fails under 5.5.1 #57755

Closed SusanDoggie closed 2 years ago

SusanDoggie commented 2 years ago
Previous ID SR-15450
Radar None
Original Reporter @SusanDoggie
Type Bug
Environment swift 5.5.1 linux
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: b3337cc5a90f3ca83721aef7c06b8881

Issue Description:

repo: https://github.com/SusanDoggie/Doggie/tree/a747baced8a4686467fd6bf29079d7ef321e4f7b

1.  Swift version 5.5.1 (swift-5.5.1-RELEASE)
276
2.  
277
3.  Contents of /tmp/TemporaryDirectory.VPeIRJ/sources-1:

4.  While evaluating request TypeCheckSourceFileRequest(source_file "/__w/Doggie/Doggie/Sources/DoggieGraphics/Color/Color.swift")
543
5.  While evaluating request TypeCheckFunctionBodyRequest(DoggieGraphics.(file).Color extension._@/__w/Doggie/Doggie/Sources/DoggieGraphics/Color/Color.swift:443:45)
544
6.  While type-checking statement at [/__w/Doggie/Doggie/Sources/DoggieGraphics/Color/Color.swift:443:45 - line:445:5] RangeText="{
545
        return Color<XYZColorModel>(colorSpace: colorSpace.cieXYZ, color: colorSpace.convertToXYZ(color), opacity: opacity)
546
    "
547
7.  While type-checking statement at [/__w/Doggie/Doggie/Sources/DoggieGraphics/Color/Color.swift:444:9 - line:444:123] RangeText="return Color<XYZColorModel>(colorSpace: colorSpace.cieXYZ, color: colorSpace.convertToXYZ(color), opacity: opacity"
548
8.  While type-checking expression at [/__w/Doggie/Doggie/Sources/DoggieGraphics/Color/Color.swift:444:16 - line:444:123] RangeText="Color<XYZColorModel>(colorSpace: colorSpace.cieXYZ, color: colorSpace.convertToXYZ(color), opacity: opacity"
549
9.  While evaluating request GenericSignatureRequest(DoggieGraphics.(file).ColorSpace extension.convertToXYZ@/__w/Doggie/Doggie/Sources/DoggieGraphics/ColorSpace/ColorSpace.swift:275:17)
550
10. While evaluating request InferredGenericSignatureRequest(DoggieGraphics.DoggieGraphics, <Model where Model : ColorModel>, DoggieGraphics.(file).ColorSpace extension.convertToXYZ@/__w/Doggie/Doggie/Sources/DoggieGraphics/ColorSpace/ColorSpace.swift:275:17, {}, {(S, S), (T, T)}, 0)
551
11. While checking generic signature <τ_0_0, τ_1_0, τ_1_1 where τ_0_0 == τ_1_0.Model, τ_1_0 : ColorPixel, τ_1_1 : ColorPixel, τ_0_0.Float16Components == τ_1_0.Model.Float16Components.Model.Float16Components, τ_1_1.Model == XYZColorModel> in requirement #&#8203;3

full report: https://github.com/SusanDoggie/Doggie/runs/4126604919?check_suite_focus=true

SusanDoggie commented 2 years ago

another case

repo: https://github.com/SusanDoggie/Doggie/tree/ae36ef457f9728b9f6ab794ce2cdd7c447ed9fbe

4.  While evaluating request TypeCheckSourceFileRequest(source_file "/__w/Doggie/Doggie/Sources/DoggieGraphics/Color/Color.swift")
544
5.  While evaluating request TypeCheckFunctionBodyRequest(DoggieGraphics.(file).Color extension.blended(source:compositingMode:blendMode:)@/__w/Doggie/Doggie/Sources/DoggieGraphics/Color/Color.swift:480:17)
545
6.  While type-checking statement at [/__w/Doggie/Doggie/Sources/DoggieGraphics/Color/Color.swift:480:151 - line:486:5] RangeText="{
546
        let source = source.convert(to: colorSpace, intent: .default)
547
        let _source = Float64ColorPixel(color: source.color, opacity: source.opacity)
548
        let _destination = Float64ColorPixel(color: self.color, opacity: self.opacity)
549
        let color = _destination.blended(source: _source, compositingMode: compositingMode, blendMode: blendMode)
550
        return Color(colorSpace: colorSpace, color: color.color, opacity: color.opacity)
551
    "
552
7.  While type-checking declaration 0xb064138 (at /__w/Doggie/Doggie/Sources/DoggieGraphics/Color/Color.swift:482:9)
553
8.  While evaluating request PatternBindingEntryRequest((unknown decl), 0)
554
9.  While type-checking expression at [/__w/Doggie/Doggie/Sources/DoggieGraphics/Color/Color.swift:482:23 - line:482:85] RangeText="Float64ColorPixel(color: source.color, opacity: source.opacity"
555
10. While evaluating request ValueWitnessRequest(<Model where Model : ColorModel> Float64ColorPixel<Model>: ColorPixel module DoggieGraphics, DoggieGraphics.(file).ColorPixel.init()@/__w/Doggie/Doggie/Sources/DoggieGraphics/ColorPixel/ColorPixel.swift:30:5)
556
11. While evaluating request InterfaceTypeRequest(DoggieGraphics.(file).ColorPixel.init(_:)@/__w/Doggie/Doggie/Sources/DoggieGraphics/ColorPixel/ColorPixel.swift:34:5)
557
12. While evaluating request GenericSignatureRequest(DoggieGraphics.(file).ColorPixel.init(_:)@/__w/Doggie/Doggie/Sources/DoggieGraphics/ColorPixel/ColorPixel.swift:34:5)
558
13. While evaluating request InferredGenericSignatureRequest(DoggieGraphics.DoggieGraphics, <Self where Self : ColorPixel>, DoggieGraphics.(file).ColorPixel.init(_:)@/__w/Doggie/Doggie/Sources/DoggieGraphics/ColorPixel/ColorPixel.swift:34:5, {}, {(C, C)}, 0)
559
14. While checking generic signature <τ_0_0, τ_1_0 where τ_0_0 : ColorPixel, τ_1_0 : ColorPixel, τ_0_0.Model == τ_1_0.Model, τ_0_0.Model.Float16Components == τ_1_0.Model.Float16Components.Model.Float16Components> in requirement #&#8203;3

full report: https://github.com/SusanDoggie/Doggie/runs/4129571941?check_suite_focus=true