Skip to content

Instantly share code, notes, and snippets.

@krzyzanowskim
Created December 18, 2016 19:26
Show Gist options
  • Save krzyzanowskim/d02732571b45902154dcf3939a735eb7 to your computer and use it in GitHub Desktop.
Save krzyzanowskim/d02732571b45902154dcf3939a735eb7 to your computer and use it in GitHub Desktop.
error: ambiguous use of inherited type
class A {
enum Reusable {
case option1
}
}
class B: A {
enum Reusable {
case option1
}
func process() {
_ = B.Reusable.option1
// Untitled.swift:13:9: error: ambiguous use of 'option1'
// _ = B.Reusable.option1 // how this is ambiguous?
// ^
// Untitled.swift:9:8: note: found this candidate
// case option1
// ^
// Untitled.swift:3:8: note: found this candidate
// case option1
// ^
}
}
let a = A()
let b = B()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment