Skip to content

[Bug] ErrorKit is used for both the package name and enum #40

Description

@joseph-elmallah

Steps to Reproduce:

Having the name ErrorKit be both the import and the main enum creates problems for the compiler when trying to disambiguate colliding names.

  1. Import ErrorKit and SQLiteData
  2. Try to throw a DatabaseError (it exists in both packages)
  3. You can select the latter using SQLiteData.DatabaseError but you can't specify ErrorKit.DatabaseError
import SQLiteData
import ErrorKit

typealias EKDBError = ErrorKit.DatabaseError  // <-- 'DatabaseError' is not a member type of enum 'ErrorKit.ErrorKit'
typealias SQLDBError = SQLiteData.DatabaseError // Works fine

Expected Behavior:

Have a different package name than the main enum so you can prefix the names of classes.

Current Behavior:

'DatabaseError' is not a member type of enum 'ErrorKit.ErrorKit' thrown when trying to select a specific name that conflicts with another package.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions