Skip to content

Commit

Permalink
Return a nil scope also for parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
trupin committed Sep 18, 2018
1 parent 5a47f76 commit dd820ed
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Sources/WeaverCodeGen/Linker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ extension Dependency {
}

var scope: Scope? {
return !isReference ? configuration.scope : nil
return nil
}

var configuration: DependencyConfiguration {
Expand All @@ -195,6 +195,17 @@ extension Dependency {
var isReference: Bool {
return self is Reference
}

private var isRegistration: Bool {
return self is Registration
}
}

extension Dependency where Self: Registration {

var scope: Scope? {
return configuration.scope
}
}

/**
Expand Down

0 comments on commit dd820ed

Please sign in to comment.