CSFixとラベルマッチ

 CSFixとラベルマッチ

3781f49ea2c76d6ecf0c6cda46096d49?s=128

omochimetaru

May 22, 2020
Tweet

Transcript

  1. CSFixͱϥϕϧϚον Θ͍Θ͍swiftc #20 @omochimetaru 1

  2. ࣗݾ঺հ • ৽ถSwiftίϛολʔ 2

  3. ࠓ೔ͷํ਑ • (ࣗ෼͸)ΦϯϥΠϯൃදΛฉ͘ͷ͸ूத౓͕Լ͕Δ • ࿩͢ଆ͔Βͯ͠΋ɺϦΞΫγϣϯ͕গͳΊͰඍົ • खΛಈ͔ͯ͠΋Β͍·͢ # • λʔϛφϧͱΤσΟλΛ։͍͓͍ͯͯͶ

    3
  4. Swift 5.2 ͷ৽ػೳ 4

  5. ৽਍அػߏ (New Diagnostic Architecture) (CSFix) 5

  6. ެࣜͷղઆϒϩάهࣄ New Diagnostic Architecture Overview https://swift.org/blog/new-diagnostic-arch-overview/ 6

  7. ৽਍அػߏ • ݴޠػೳͰ͸ͳ͍ͷͰ͋·Γ஫໨͞Ε͍ͯͳ͍(ͱࢥ͏) • ͚ͩͲɺίϯύΠϥͷػೳͱͯ͠͸ڧྗʂ 7

  8. ྫ 8

  9. ϛεͷ͋Δίʔυ1 func f(aa: Int, bb: Int) {} func main() {

    // ❌ `bb:` Λ෇͚๨Ε͍ͯΔ f(aa: 1, 2) } 9
  10. Swift 5.1.5, Swift 5.2.2 (Xcode11.4.1) $ alias swift515='xcrun --toolchain org.swift.515120200323a

    swift' $ swift515 a.swift a.swift:4:6: error: missing argument label 'bb:' in call f(aa: 1, 2) ^ bb: ! 10
  11. ϛεͷ͋Δίʔυ2 func f(aa: Int, bb: Int) {} // fͷΦʔόʔϩʔυ͕௥Ճ͞Ε͍ͯΔ func

    f(cc: Int, dd: Int) {} func main() { // ❌ `bb:` Λ෇͚๨Ε͍ͯΔ f(aa: 1, 2) } 11
  12. Swift 5.1.5 $ swift515 a.swift a.swift:6:5: error: argument labels '(aa:,

    _:)' do not match any available overloads f(aa: 1, 2) ^~~~~~~~~~~ a.swift:6:5: note: overloads for 'f' exist with these partially matching parameter lists: (aa: Int, bb: Int), (cc: Int, dd: Int) f(aa: 1, 2) ^ ! 12
  13. Swift 5.2.2 (Xcode11.4.1) $ swift a.swift ΍ͬͯΈͯʂ 13

  14. Swift 5.2.2 (Xcode11.4.1) $ swift a.swift a.swift:6:6: error: missing argument

    label 'bb:' in call f(aa: 1, 2) ^ bb: ! 14
  15. Կ͕ى͖͍ͯΔ͔ • ίϯύΠϥ͕ɺϢʔβ͕ͲͬͪͷΦʔόʔϩʔυΛݺͿͭ΋ Γͩͬͨͷ͔ɺ༧ଌ͍ͯ͠Δ 15

  16. چڍಈͱܕਪ࿦ 16

  17. • ܕਪ࿦ʹ͓͍ͯΦʔόʔϩʔυ͸Disjunction Constraintͱ͠ ͯѻΘΕΔ <disjunction> { $T1 <bind OL> (aa:

    Int, bb: Int) -> Void $T1 <bind OL> (cc: Int, dd: Int) -> Void } $T1 <appfn> (aa: Int, _: Int) -> Void 17
  18. Disjunctionۭؒͷ୳ࡧ • ީิ੍໿ΛҰͭͣͭਪ࿦ثʹࢼ͠ʹ౤ೖ͢Δ • શ෦ࣦഊ → Τϥʔ: Ϛον͢ΔΦʔόʔϩʔυ͕ແ͍ • Ұͭ੒ޭ

    → ͦΕΛܕਪ࿦݁Ռͱͯ͠࠾༻ • ෳ਺੒ޭ → ੒ޭͨ͠ղಉ࢜Λൺֱͯ͠ɺ࠷ྑͷ΋ͷΛબ୒ • ൺֱ݁Ռ͕ಉ཰ҰҐ → Τϥʔ: ᐆດͳίʔυ 18
  19. ղͷൺֱ(෮श) func f(_ a: Int?) { print("Int?") } func f(_

    a: Any) { print("Any") } func main() { // 1 ͸ Int? Ͱ΋͋Δ͠ɺ Any Ͱ΋͋Δɻ f(1) } main() 19
  20. ղͷൺֱ $ swift b.swift ΍ͬͯΈͯʂ 20

  21. ղͷൺֱ $ swift b.swift Any 21

  22. ղͷൺֱͷঢ়گͷ؍࡯ $ swift -Xfrontend -debug-constraints b.swift Comparing 2 viable solutions

    --- Solution #0 --- Fixed score: 0 0 0 0 0 0 0 0 1 0 0 0 Type variables: $T0 as (Int?) -> () @ locator@0x7ff8a0808800 [OverloadedDeclRef@b.swift:6:5] --- Solution #1 --- Fixed score: 0 0 0 0 0 0 0 0 0 1 0 0 Type variables: $T0 as (Any) -> () @ locator@0x7ff8a0808800 [OverloadedDeclRef@b.swift:6:5] 22
  23. ղͷείΞ(ίετ) 0 0 0 0 0 0 0 0 1

    0 0 0 ^ SK_ValueToOptional ͸ Level4 0 0 0 0 0 0 0 0 0 1 0 0 ^ SK_EmptyExistentialConversion ͸ Level3 • Any΁ͷม׵ͷํ͕͍҆ 23
  24. ࢀߟ: աڈͷൃද SwiftͷΦʔόʔϩʔυબ୒ͷείΞنଇ12छྨ https://speakerdeck.com/omochi/ swiftfalseobarodoxuan-ze-falsesukoagui-ze-12zhong- lei 24

  25. ৽ڍಈͷ࣮ݱํ๏ 25

  26. ৽ڍಈͷ࣮ݱํ๏ ΋͏࡯ͨ͠ਓ͸ɺڍख 26

  27. ৽ڍಈͷ࣮ݱํ๏ • ؒҧ͍͕͕͋ͬͨम෮ͨ͠ɺͱ͍͏είΞ(SK_Fix)Λఆٛ͢ Δ • ؔ਺ݺͼग़͠Ͱϥϕϧʹؒҧ͍͕͋ͬͯ΋ɺम෮είΞΛੵ ΜͰॲཧΛ͢͢ΊΔ • ࠷ऴతʹम෮είΞͷ෇͍ͨղ͕બ୒͞Εͨ৔߹ɺ ίϯύΠϧΤϥʔʹͭͭ͠ɺͦͷղʹର͢Δ਍அΛग़ྗ͢Δ

    27
  28. म෮ͷঢ়گͷ؍࡯ // (౎߹্ɺఆٛॱΛೖΕସ͑) func f(cc: Int, dd: Int) {} func

    f(aa: Int, bb: Int) {} func main() { f(aa: 1, 2) } $ swift -Xfrontend -debug-constraints a.swift 28
  29. म෮ͷঢ়گͷ؍࡯ $ swift -Xfrontend -debug-constraints a.swift --- Solution #0 ---

    Fixed score: 4 0 0 0 0 0 0 0 0 0 0 0 Fixes: [fix: re-label argument(s)] @ locator@0x7ff8e08cf100 [Call@a.swift:4:5 -> apply argument] --- Solution #1 --- Fixed score: 1 0 0 0 0 0 0 0 0 0 0 0 Fixes: [fix: re-label argument(s)] @ locator@0x7ff8e08cf100 [Call@a.swift:4:5 -> apply argument] 29
  30. Fixed score: 4 0 0 0 0 0 0 0

    0 0 0 0 ^ Level12ͷSK_Fix͕4఺ = ϥϕϧΤϥʔͷجຊ఺͕1఺ + aa: → cc: ͷwrong͕3఺ + _: → dd: ͷmissing͕0఺ Fixed score: 1 0 0 0 0 0 0 0 0 0 0 0 ^ Level12ͷSK_Fix͕1఺ = ϥϕϧΤϥʔͷجຊ఺͕1఺ + _: → bb: ͷmissing͕0఺ • (aa:_:)͔Βͷम෮͸(aa:bb:)ͷํ͕(cc:dd:)ΑΓ͍҆ 30
  31. ܕΤϥʔ΋म෮Ͱ͖Δ func f(aa: String) {} func f(bb: Int) {} func

    main() { // ϥϕϧͷؒҧ͍۩߹͸ಉ཰͚ͩͲɾɾɾ f(cc: 1) } 31
  32. $ swift c.swift c.swift:5:6: error: incorrect argument label in call

    (have 'cc:', expected 'bb:') f(cc: 1) ^~~ bb • (bb: Int) ͷํΛݺͼ͔ͨͬͨͩΖ͏ͱ൑அ͍ͯ͠Δ 32
  33. ܕΤϥʔम෮ͷ؍࡯ --- Solution #0 --- Fixed score: 6 0 0

    0 0 0 0 0 0 0 0 0 Fixes: [fix: re-label argument(s)] @ locator@0x7fc7638cedf8 [Call@c.swift:5:5 -> apply argument] [fix: allow argument to parameter type conversion mismatch] @ locator@0x7fc7638cee48 [Call@c.swift:5:5 -> apply argument -> comparing call argument #0 to parameter #0] --- Solution #1 --- Fixed score: 4 0 0 0 0 0 0 0 0 0 0 0 Fixes: [fix: re-label argument(s)] @ locator@0x7fc7638cedf8 [Call@c.swift:5:5 -> apply argument] 33
  34. • (cc: 1) to (aa: String) ͸ ϥϕϧΤϥʔجຊ఺1఺ + cc:→aa:

    wrong 3఺ + ܕΤϥʔ2఺ Ͱ߹ܭ6఺ • (cc: 1) to (bb: Int) ͸ ϥϕϧΤϥʔجຊ఺1఺ + cc:→bb: wrong 3఺ Ͱ߹ܭ4఺Ͱͪ͜Β͕͍҆ 34
  35. ͜͜·Ͱͷ·ͱΊ • Swift5.2Ͱ͸ɺΤϥʔΛम෮͠ͳ͕Βܕਪ࿦ΛਐΊΔCSFixػ ߏ͕ೖͬͨ͜ͱͰɺ Φʔόʔϩʔυ͕ؔΘΔίϯύΠϧΤϥʔ͕ΑΓ਌੾ʹͳͬ ͨ • ͦͷ࣮ݱʹ͸ɺෳ਺ͷਪ࿦ղΛ༏ઌ౓෇͚͢Δطଘͷ࢓૊Έ Λ͏·͘׆༻ͨ͠ 35

  36. ϥϕϧϚονϯά 36

  37. ϥϕϧϚονϯά • ؔ਺ݺͼग़͠ʹ͓͍ͯɺݺͼग़͠ଆͷ࣮Ҿ਺ͱɺ ؔ਺ଆͷԾҾ਺ͷରԠؔ܎ΛܾΊΔॲཧΛ ϥϕϧϚονϯάͱݺͿͬΆ͍ (ίϛοτϝοηʔδͱ͔ݟͯΔͱ) • Swiftͷ͜ͷ͋ͨΓͷݴޠ࢓༷͸͔ͳΓෳࡶ • म෮͢Δ৔߹΋ߟ͑Δͱ͞ΒʹෳࡶʹͳΔ

    37
  38. ϥϕϧࢦఆ func f(aa: Int, bb: Int, cc: Int) {} f(aa:

    1, bb: 2, cc: 3) 38
  39. ϥϕϧؒҧ͍ͱॱ൪ؒҧ͍ func f(aa: Int, bb: Int, cc: Int) {} f(aax:

    1, bb: 2, cc: 3) // incorrect argument label in call (have 'aax:bb:cc:', expected 'aa:bb:cc:') f(bb: 2, cc: 3, aa: 1) // argument 'aa' must precede argument 'bb' 39
  40. ϥϕϧͳ͠Ҿ਺ func f(_ aa: Int, _ bb: Int, cc: Int)

    {} f(1, 2, cc: 3) 40
  41. ϥϕϧ๨Εͱϥϕϧա৒ func f(_ aa: Int, _ bb: Int, cc: Int)

    {} f(1, 2, 3) // missing argument label 'cc:' in call f(1, bb: 2, cc: 3) // extraneous argument label 'bb:' in call 41
  42. Ҿ਺ա৒ͱҾ਺ෆ଍ func f(aa: Int, bb: Int, cc: Int) {} f(aa:

    1, bb: 2, cc: 3, dd: 4) // extra argument 'dd' in call f(aa: 1, bb: 2) // missing argument for parameter 'cc' in call 42
  43. ϥϕϧͳ͠Ҿ਺ͱҾ਺ෆ଍ͷ૊Έ߹Θͤ func f(_ aa: Int, bb: Int, _ cc: Int)

    {} f(bb: 2, 3) // missing argument for parameter #1 in call • bb:Λج४ʹ3Λ_ cc:ʹϚονɺ_ aa:͕ෆ଍ͱ൑அ 43
  44. Մม௕Ҿ਺ func f(aa: Int, bb: Int..., cc: Int) {} f(aa:

    1, bb: 21, 22, cc: 3) f(aa: 1, cc: 3) 44
  45. Մม௕Ҿ਺ͱϥϕϧͳ͠Ҿ਺ func f(aa: Int, bb: Int..., _ cc: Int) {}

    // a parameter following a variadic parameter requires a label • Մม௕Ҿ਺ͷޙଓ͸ϥϕϧ͕ඞਢ • ҎԼͷ৔߹ʹ3͕ᐆດʹͳΔ͔ΒͩΖ͏ f(aa: 1, bb: 2, 3) 45
  46. Մม௕Ҿ਺͸1ͭ·Ͱ func f(aa: Int..., bb: Int...) {} // only a

    single variadic parameter '...' is permitted • ͜ͷ੍ݶΛ֎͢ఏҊ͕͋Δ • Lifting the 1 variadic param per function restriction https://forums.swift.org/t/lifting-the-1-variadic- param-per-function-restriction/33787 46
  47. σϑΥϧτ෇͖Ҿ਺ func f(aa: Int, bb: Int = 0, _ cc:

    Int) {} f(aa: 1, bb: 2, 3) f(aa: 1, 3) 47
  48. ϥϕϧແ͠σϑΥϧτ෇͖Ҿ਺ func f(aa: Int, _ bb: Int = 0, _

    cc: Int) {} f(aa: 1, 2, 3) // OK f(aa: 1, 3) ΍ͬͯΈͯʂ 48
  49. ػೳ͠ͳ͍ϥϕϧແ͠σϑΥϧτ෇͖Ҿ਺ func f(aa: Int, _ bb: Int = 0, _

    cc: Int) {} f(aa: 1, 2, 3) // OK f(aa: 1, 3) // missing argument for parameter #3 in call • σϑΥϧτ෇͖ϥϕϧແ͠Ҿ਺ʹɺϥϕϧແ͠Ҿ਺͕ଓ͘ͱɺ ͜ͷσϑΥϧτ஋͕࢖ΘΕΔࣄ͸ͳ͍ • ޙଓͷϥϕϧແ͠Ҿ਺͚ͩ౉ͨͯ͘͠΋ɺ खલͷσϑΥϧτ෇͖Ҿ਺ʹٵ͍ࠐ·ΕΔ 49
  50. ϥϕϧ෇͖σϑΥϧτ෇͖Ҿ਺ func f(aa: Int, bb: Int = 0, bb cc:

    Int) {} f(aa: 1, bb: 2, bb: 3) // OK f(aa: 1, bb: 3) ΍ͬͯΈͯʂ 50
  51. ػೳ͠ͳ͍ϥϕϧ෇͖σϑΥϧτ෇͖Ҿ਺ func f(aa: Int, bb: Int = 0, bb cc:

    Int) {} f(aa: 1, bb: 2, bb: 3) // OK f(aa: 1, bb: 3) // missing argument for parameter 'bb' in call • ಉ͡ϥϕϧΛ࢖͏ࣄ͕Ͱ͖ΔͷͰɺ σϑΥϧτ෇͖ϥϕϧ෇͖Ҿ਺ʹɺಉ͡ϥϕϧҾ਺͕ଓ͘ͱɺ ΍͸Γ࢖ΘΕͳ͍σϑΥϧτ஋͕ੜ͡Δ 51
  52. Մม௕Ҿ਺ͷޙଓͷػೳ͠ͳ͍ϥϕϧ෇͖σϑΥ ϧτ෇͖Ҿ਺ func f(aa: Int, bb: Int..., cc: Int =

    0, _ dd: Int) {} f(aa: 1, bb: 2, cc: 3, 4) // OK f(aa: 1, bb: 2, 4) // missing argument for parameter #4 in call • Մม௕Ҿ਺ͷޙʹσϑΥϧτ෇͖Ҿ਺Λஔ͍ͯɺ ͞Βʹͦͷޙʹϥϕϧແ͠Ҿ਺Λஔ͘ͱɺ ػೳ͠ͳ͍σϑΥϧτ஋͕ੜ͡Δ • σϑΥϧτ෇͖Ҿ਺Λলུͨ͠৔߹ɺ Մม௕Ҿ਺ͷޙଓͷ஋΋Մม௕Ҿ਺ʹٵ͍ࠐ·ΕΔͨΊɺ ϥϕϧແ͠Ҿ਺ʹ஋Λ༩͑Δࣄ͕Ͱ͖ͳ͍ 52
  53. ຤ඌΫϩʔδϟ func f(aa: Int, bb: Int, cc: () -> Void)

    {} f(aa: 1, bb: 2) { } 53
  54. ෆਖ਼ͳ຤ඌΫϩʔδϟ౉͠ func f(aa: Int, bb: Int, cc: Int) {} f(aa:

    1, bb: 2) { } // trailing closure passed to parameter of type 'Int' that does not accept a closure 54
  55. δΣωϦΫεͱ຤ඌΫϩʔδϟ func f<T>(type: T.Type, aa: Int, bb: Int, cc: T)

    {} f(type: (() -> Void).self, aa: 1, bb: 2) { } 55
  56. δΣωϦΫεͱෆਖ਼ͳ຤ඌΫϩʔδϟ౉͠ func f<T>(type: T.Type, aa: Int, bb: Int, cc: T)

    {} f(type: Int.self, aa: 1, bb: 2) { } // cannot convert value of type '() -> ()' to expected argument type 'Int' • ຤ඌΫϩʔδϟࣗମ͸ڐ༰͞Εͯ͠·ͬͯɺͦͷઌͰܕΤ ϥʔʹͳΔ 56
  57. ຤ඌΫϩʔδϟͱޙଓͷσϑΥϧτ෇͖Ҿ਺ func f(aa: Int, bb: () -> Void, cc: Int

    = 0) {} f(aa: 1) { } ΍ͬͯΈͯʂ 57
  58. ຤ඌΫϩʔδϟͱޙଓͷσϑΥϧτ෇͖Ҿ਺ func f(aa: Int, bb: () -> Void, cc: Int

    = 0) {} f(aa: 1) { } • ࠷ۙͰ͖ΔΑ͏ʹͳͬͨ 58
  59. ຤ඌΫϩʔδϟͱޙଓͷσϑΥϧτ෇͖Ҿ਺ͷॱ ൪ؒҧ͍ func f(aa: Int, bb: () -> Void, cc:

    Int = 0) {} f(aa: 1, cc: 3) { } ΍ͬͯΈͯʂ 59
  60. ຤ඌΫϩʔδϟͱޙଓͷσϑΥϧτ෇͖Ҿ਺ͷॱ ൪ؒҧ͍ func f(aa: Int, bb: () -> Void, cc:

    Int = 0) {} f(aa: 1, cc: 3) { } // OK • όάʁ 60
  61. ຤ඌΫϩʔδϟͱޙଓͷෳ਺ͷσϑΥϧτ෇͖Ҿ ਺ func f(aa: Int, bb: () -> Void, cc:

    Int = 0, dd: Int = 0) {} f(aa: 1) { } ΍ͬͯΈͯʂ 61
  62. ຤ඌΫϩʔδϟͱޙଓͷෳ਺ͷσϑΥϧτ෇͖Ҿ ਺ func f(aa: Int, bb: () -> Void, cc:

    Int = 0, dd: Int = 0) {} f(aa: 1) { } // trailing closure passed to parameter of type 'Int' that does not accept a closure // missing argument for parameter 'bb' in call • Ͱ͖ͳ͍(ͳΜͰ΍) • ๻͕PRΛग़ͯ͠Ϛʔδ͞Εɺ࣮૷͞Εͨ https://github.com/apple/swift/pull/29845 • ͔͠͠ɺ͍Ζ͍Ζ͋ͬͯrevert͞Εͨ ! https://github.com/apple/swift/pull/30656 62
  63. Մม௕Ҿ਺ͱ຤ඌΫϩʔδϟ func f(aa: Int, bb: Int, cc: () -> Void...)

    {} f(aa: 1, bb: 2) {} // OK f(aa: 1, bb: 2, cc: {}, {}) // OK f(aa: 1, bb: 2, cc: {}) {} ΍ͬͯΈͯʂ 63
  64. Մม௕Ҿ਺ͱ຤ඌΫϩʔδϟ func f(aa: Int, bb: Int, cc: () -> Void...)

    {} f(aa: 1, bb: 2) {} // OK f(aa: 1, bb: 2, cc: {}, {}) // OK f(aa: 1, bb: 2, cc: {}) {} // extra argument 'cc' in call • ຤ඌΫϩʔδϟͷϚον͕͞ΕΔͱՄม௕ػೳ͕ޮ͔ͳ͍ • όάʁ 64
  65. ϥϕϧͷtypoݕग़Ϛον func f(aa: Int, bb: Int, cc: Int) {} f(aa:

    1, dd: 4, bbx: 2, cc: 3) // extra argument 'dd' in call f(aa: 1, dd: 4, ee: 5, cc: 3) // extra arguments at positions #2, #3 in call // missing argument for parameter 'bb' in call • ฤूڑ཭͕͋Δ৚݅Λຬͨ࣌͢ɺtypoѻ͍͢Δ • 1݅໨͸bbx:͕bb:ͷtypoͩͱ൑ఆ͞Ε͍ͯΔͷͰɺ2݅໨ͱ͸ҟͳΔΤϥʔʹͳ Δ 65
  66. ෳ਺ͷ຤ඌΫϩʔδϟ UIView.animate(withDuration: 0.3) { self.view.alpha = 0 } completion: {

    _ in self.view.removeFromSuperview() } • ࠷ۙAccept͞ΕͨSE-0279 • ͞ΒʹෳࡶʹͳͬͨͶʂ ! 66
  67. ෆ଍Ҿ਺ͷಛघڍಈ func f(_ aa: Int, _ bb: Int) {} f(1)

    // missing argument for parameter #2 in call • ͜Ε͸ී௨ 67
  68. ෆ଍Ҿ਺ͷಛघڍಈ func f(_ aa: String, _ bb: Int) {} f(1)

    ΍ͬͯΈͯʂ 68
  69. ෆ଍Ҿ਺ͷಛघڍಈ func f(_ aa: String, _ bb: Int) {} f(1)

    // missing argument for parameter #1 in call • Ҿ਺ͷ1͕_ bb:ʹ౉͞Εͨࣄʹͳ͍ͬͯΔ • ϚονϯάͰܕΛݟ͍ͯΔʁ 69
  70. ෆ଍Ҿ਺ͷಛघڍಈ • Ϛονϯά͸௨ৗ௨Γ΍͍ͬͯΔ • ਍அϑΣʔζͰޙ͔Βղऍมߋ͍ͯ͠Δ (ܕΤϥʔͳͲଞͷFixείΞͱໃ६ͨ͠ৼΔ෣͍Λੜ͡͏ Δɾɾɾ) • [Diagnostics] Port

    missing argument(s) diagnostics #27362 https://github.com/apple/swift/pull/27362 70
  71. ෆ଍Ҿ਺ͷಛघڍಈ func f(_ aa: String, _ bb: Int, cc: Int)

    {} f(1, cc: 3) ΍ͬͯΈͯʂ 71
  72. ෆ଍Ҿ਺ͷಛघڍಈ func f(_ aa: String, _ bb: Int, cc: Int)

    {} f(1, cc: 3) // missing argument for parameter #2 in call // cannot convert value of type 'Int' to expected argument type 'String' • 3Ҿ਺ͩͱൃಈ͠ͳ͍(ͳΜͰ΍) 72
  73. ෆ଍Ҿ਺ͷಛघڍಈ func f(aa: String, bb: Int) {} f(aa: 1) ΍ͬͯΈͯʂ

    73
  74. ෆ଍Ҿ਺ͷಛघڍಈ func f(aa: String, bb: Int) {} f(aa: 1) //

    missing argument for parameter 'aa' in call • ϥϕϧ͕͋ͬͯ΋ൃಈ͢Δ • ҙຯෆ໌ͳৼΔ෣͍ʹͳΔɺόάʁ 74
  75. ෆ଍Ҿ਺ͷಛघڍಈ func f(aa: String = "", bb: Int) {} f(aa:

    1) ΍ͬͯΈͯʂ 75
  76. ෆ଍Ҿ਺ͷಛघڍಈ func f(aa: String = "", bb: Int) {} f(aa:

    1) // missing argument for parameter 'aa' in call • σϑΥϧτҾ਺Λ༩͑ΔࣄͰ׬શʹҙຯෆ໌ʹ 76
  77. όά΍ṖڍಈΛΈ͚ͭΑ͏ • ෳࡶͳͷͰɺ࢓༷͕૊Έ߹Θ͞Δ෦෼ͳͲͰո͍͠ڍಈ͕ ͋ͬͨΓ͢Δ • Ϋϥογϡόά΋͋ͬͨ(ϫγ͕௚ͨ͠) https://github.com/apple/swift/pull/30348 • SE-0279͸৽͍͠ര஄͔΋ !

    77
  78. ·ͱΊ • Swift5.2Ͱ͸ɺΤϥʔΛम෮͠ͳ͕Βܕਪ࿦ΛਐΊΔCSFixػ ߏ͕ೖͬͨ͜ͱͰɺ Φʔόʔϩʔυ͕ؔΘΔίϯύΠϧΤϥʔ͕ΑΓ਌੾ʹͳͬ ͨ • ͦͷ࣮ݱʹ͸ɺෳ਺ͷਪ࿦ղΛ༏ઌ౓෇͚͢Δطଘͷ࢓૊Έ Λ͏·͘׆༻ͨ͠ •

    ϥϕϧϚον͸ͱͯ΋ෳࡶ 78