refactor(ffi-linkage): Phase 9.2b-fix — use is_extern (not new is_reference) for the runtime-class ref flag
Per user feedback: don't introduce new terminology. The RuntimeClassDecl reference-vs-define flag (set by the postfix 'extern' modifier, == old prefix '#foreign #objc_class') is named is_extern, matching the keyword that drives it and the existing is_extern on VarDecl/IR. Renamed is_reference→is_extern, is_reference_eff→is_extern_eff; updated the field comment. Snapshot-neutral; green.
This commit is contained in:
@@ -1334,14 +1334,14 @@ pub const Analyzer = struct {
|
||||
},
|
||||
.runtime_class_decl => |fd| {
|
||||
try self.addSymbol(fd.name, .type_alias, null, node.span);
|
||||
if (fd.is_reference and fd.is_main) {
|
||||
if (fd.is_extern and fd.is_main) {
|
||||
try self.diagnostics.append(self.allocator, .{
|
||||
.level = .err,
|
||||
.message = "'#foreign' and '#jni_main' / '#objc_main' are mutually exclusive — a foreign-referenced class can't be the app's main entry",
|
||||
.span = node.span,
|
||||
});
|
||||
}
|
||||
if (fd.is_reference) {
|
||||
if (fd.is_extern) {
|
||||
for (fd.members) |m| switch (m) {
|
||||
.method => |md| if (md.body != null) {
|
||||
try self.diagnostics.append(self.allocator, .{
|
||||
|
||||
Reference in New Issue
Block a user