Replies: 2 comments 1 reply
-
|
Hi @dirk68-fu, I'm not sure there is much we can do about this. The problem is that the macro expands an extension of nonisolated extension Outer.Inner2: Table, PrimaryKeyedTable {
public nonisolated init(decoder: inout some QueryDecoder) throws {
let inner1ID = try decoder.decode(Inner1.ID.self)
…
}
…
}
In this extension, a bare struct Outer {
struct Inner1 {}
struct Inner2 {
typealias A = Inner1 // ✅
}
}
extension Outer.Inner2 {
typealias B = Inner1 // 🛑
}And on top of this, we do not have enough information from the syntax to determine if we should fully qualify your types with Since this isn't an issue with the library I am going to convert it to a discussion. Please feel free to continue the conversation over there! |
Beta Was this translation helpful? Give feedback.
-
|
Could you do anything about the error message? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
The following
results in an error: 'Inner1' in scope inside the macro expansion.
Checklist
mainbranch of this package.Expected behavior
The Swift compiles has no problem with Inner1.ID but the macro does. You have to revert to Outer.Inner1.ID to make it work.
Unfortunately swifts error message is not very helpful.
Actual behavior
No response
Reproducing project
No response
SharingGRDB version information
No response
Sharing version information
No response
GRDB version information
No response
Destination operating system
No response
Xcode version information
No response
Swift Compiler version information
Beta Was this translation helpful? Give feedback.
All reactions