forked from rosa/hakurei
internal/rosa: handle nil source
Source is not always required. This improves flexibility. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -1134,10 +1134,12 @@ func (ctx *evalContext) pf(
|
||||
}
|
||||
|
||||
default:
|
||||
panic(azalea.TypeError{
|
||||
Concrete: reflect.TypeOf(sourceA),
|
||||
Asserted: reflect.TypeFor[pkg.Artifact](),
|
||||
})
|
||||
if sourceA != nil {
|
||||
panic(azalea.TypeError{
|
||||
Concrete: reflect.TypeOf(sourceA),
|
||||
Asserted: reflect.TypeFor[pkg.Artifact](),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
v = cachedArtifact{&meta, ctx.t.NewPackage(
|
||||
|
||||
Reference in New Issue
Block a user