@@ -43,20 +43,22 @@ sealed interface ConfiguredDependency : Dependency {
43
43
inline fun <reified T : ConfiguredDependency > T.copy (
44
44
configurationName : ConfigurationName = this.configurationName,
45
45
isTestFixture : Boolean = this.isTestFixture
46
- ): ConfiguredDependency = when (this as ConfiguredDependency ) {
47
- is ExternalDependency -> (this as ExternalDependency ).copy(
48
- configurationName = configurationName,
49
- group = group,
50
- moduleName = moduleName,
51
- version = version,
52
- isTestFixture = isTestFixture
53
- )
46
+ ): ConfiguredDependency {
47
+ return when (val dep: ConfiguredDependency = this @copy) {
48
+ is ExternalDependency -> dep.copy(
49
+ configurationName = configurationName,
50
+ group = dep.group,
51
+ moduleName = dep.moduleName,
52
+ version = dep.version,
53
+ isTestFixture = isTestFixture
54
+ )
54
55
55
- is ProjectDependency -> (this as ProjectDependency ).copy(
56
- configurationName = configurationName,
57
- path = projectPath,
58
- isTestFixture = isTestFixture
59
- )
56
+ is ProjectDependency -> dep.copy(
57
+ configurationName = configurationName,
58
+ path = dep.projectPath,
59
+ isTestFixture = isTestFixture
60
+ )
61
+ }
60
62
}
61
63
}
62
64
}
0 commit comments