Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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