Skip to content

[AutoDiff] Fix Optional differentiation crash. #33386

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

Merged
merged 1 commit into from
Aug 11, 2020

Conversation

dan-zheng
Copy link
Contributor

@dan-zheng dan-zheng commented Aug 10, 2020

Fix Optional differentiation crash for non-resilient Wrapped reference type.
Add NonresilientTracked type to DifferentiationUnittest for testing.
Add and reformat tests.

Resolves SR-13377.

Fix `Optional` differentiation crash for non-resilient `Wrapped` reference type.
Add `NonresilientTracked` type to `DifferentiationUnittest` for testing.

Resolves SR-13377.
@dan-zheng dan-zheng requested review from rxwei and marcrasi August 10, 2020 16:30
@dan-zheng
Copy link
Contributor Author

cc @efremale

@dan-zheng
Copy link
Contributor Author

@swift-ci Please test

@dan-zheng
Copy link
Contributor Author

dan-zheng commented Aug 11, 2020

The Windows failure looks like an unrelated flake:

FAIL: Swift(windows-x86_64) :: Sema/struct_equatable_hashable.swift (2294 of 6726)
******************** TEST 'Swift(windows-x86_64) :: Sema/struct_equatable_hashable.swift' FAILED ********************
Script:
--
: 'RUN: at line 1';   't:\\swift\\bin\\swift-frontend.exe' -target x86_64-unknown-windows-msvc  -module-cache-path 'T:\\swift\\swift-test-results\\x86_64-unknown-windows-msvc\\clang-module-cache' -swift-version 4  -ignore-module-source-info -typo-correction-limit 10  -typecheck -verify -primary-file S:\jenkins\workspace\swift-PR-windows\swift\test\Sema\struct_equatable_hashable.swift S:\jenkins\workspace\swift-PR-windows\swift\test\Sema/Inputs/struct_equatable_hashable_other.swift -verify-ignore-unknown -swift-version 4
--
Exit Code: 1

Command Output (stdout):
--
$ ":" "RUN: at line 1"
$ "t:\\swift\\bin\\swift-frontend.exe" "-target" "x86_64-unknown-windows-msvc" "-module-cache-path" "T:\\swift\\swift-test-results\\x86_64-unknown-windows-msvc\\clang-module-cache" "-swift-version" "4" "-ignore-module-source-info" "-typo-correction-limit" "10" "-typecheck" "-verify" "-primary-file" "S:\jenkins\workspace\swift-PR-windows\swift\test\Sema\struct_equatable_hashable.swift" "S:\jenkins\workspace\swift-PR-windows\swift\test\Sema/Inputs/struct_equatable_hashable_other.swift" "-verify-ignore-unknown" "-swift-version" "4"
# command stderr:
S:\jenkins\workspace\swift-PR-windows\swift\test\Sema\struct_equatable_hashable.swift:118:126: error: incorrect message found

  if StructWithoutExplicitConformance(a: 1, b: "b") == StructWithoutExplicitConformance(a: 2, b: "a") { } // expected-error{{referencing operator function '==' on 'Equatable' requires that 'StructWithoutExplicitConformance' conform to 'Equatable'}}

                                                                                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

                                                                                                                             operator function '==' requires that 'StructWithoutExplicitConformance' conform to 'Equatable'


error: command failed with exit status: 1

Merging to unblock progress, happy to address additional feedback later.

@dan-zheng dan-zheng merged commit 4391f42 into swiftlang:master Aug 11, 2020
@dan-zheng dan-zheng deleted the SR-13377 branch August 11, 2020 16:14
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