Skip to content
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

[SR-12789] 'τ_0_0' in conformance type-checking diagnostics #55234

Closed
dan-zheng opened this issue May 11, 2020 · 0 comments
Closed

[SR-12789] 'τ_0_0' in conformance type-checking diagnostics #55234

dan-zheng opened this issue May 11, 2020 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself type checker Area → compiler: Semantic analysis

Comments

@dan-zheng
Copy link
Collaborator

Previous ID SR-12789
Radar None
Original Reporter @dan-zheng
Type Bug
Status Resolved
Resolution Duplicate
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, TypeChecker
Assignee None
Priority Medium

md5: 7296f7255bcb329049148f6bb5f67e5c

duplicates:

  • SR-12759 Heisenbug in Witness Matching Because of Leaked Type Variables

Issue Description:

protocol Protocol {
  associatedtype Assoc
  func foo()
}
extension Protocol where Assoc == Self {
  func foo() {}
}

extension Float: Protocol {
  typealias Assoc = Float
}

struct Foo<T> {
  var x: T
}
extension Foo: Protocol {
  typealias Assoc = Float
}
$ swift tau.swift
tau.swift:16:1: error: type 'Foo<T>' does not conform to protocol 'Protocol'
extension Foo: Protocol {
^
tau.swift:6:8: note: candidate would match if 'Foo<T>' was the same type as 'Foo<τ_0_0>.Assoc' (aka 'Float')
  func foo() {}
       ^
tau.swift:3:8: note: protocol requires function 'foo()' with type '() -> ()'; do you want to add a stub?
  func foo()
       ^
@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

1 participant