Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions crates/perry/src/commands/compile/run_pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2437,6 +2437,7 @@ pub fn run_with_parse_cache(
static_field_names: class
.static_fields
.iter()
.filter(|f| f.key_expr.is_none())
.map(|f| f.name.clone())
.collect(),
getter_names: class
Expand Down Expand Up @@ -2745,6 +2746,7 @@ pub fn run_with_parse_cache(
static_field_names: class
.static_fields
.iter()
.filter(|f| f.key_expr.is_none())
.map(|f| f.name.clone())
.collect(),
getter_names: class
Expand Down Expand Up @@ -3019,6 +3021,7 @@ pub fn run_with_parse_cache(
static_field_names: class
.static_fields
.iter()
.filter(|f| f.key_expr.is_none())
.map(|f| f.name.clone())
.collect(),
getter_names: class
Expand Down Expand Up @@ -3086,6 +3089,7 @@ pub fn run_with_parse_cache(
static_field_names: class
.static_fields
.iter()
.filter(|f| f.key_expr.is_none())
.map(|f| f.name.clone())
.collect(),
getter_names: class.getters.iter().map(|(n, _)| n.clone()).collect(),
Expand Down Expand Up @@ -3244,6 +3248,7 @@ pub fn run_with_parse_cache(
static_field_names: class
.static_fields
.iter()
.filter(|f| f.key_expr.is_none())
.map(|f| f.name.clone())
.collect(),
getter_names: class.getters.iter().map(|(n, _)| n.clone()).collect(),
Expand Down Expand Up @@ -3717,6 +3722,7 @@ pub fn run_with_parse_cache(
static_field_names: class
.static_fields
.iter()
.filter(|f| f.key_expr.is_none())
.map(|f| f.name.clone())
.collect(),
getter_names: class.getters.iter().map(|(n, _)| n.clone()).collect(),
Expand Down Expand Up @@ -3916,6 +3922,7 @@ pub fn run_with_parse_cache(
static_field_names: class
.static_fields
.iter()
.filter(|f| f.key_expr.is_none())
.map(|f| f.name.clone())
.collect(),
getter_names: class.getters.iter().map(|(n, _)| n.clone()).collect(),
Expand Down
8 changes: 8 additions & 0 deletions test-files/fixtures/issue_5984_pkg/base.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { entityKind } from "./entity.ts";

export abstract class BaseSession {
static readonly [entityKind]: string = "BaseSession";
tag(): string {
return "base";
}
}
1 change: 1 addition & 0 deletions test-files/fixtures/issue_5984_pkg/entity.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const entityKind: unique symbol = Symbol.for("entityKind");
13 changes: 13 additions & 0 deletions test-files/test_issue_5984_computed_static_field_cross_module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { entityKind } from "./fixtures/issue_5984_pkg/entity.ts";
import { BaseSession } from "./fixtures/issue_5984_pkg/base.ts";

class EffectSession extends BaseSession {
static override readonly [entityKind]: string = "EffectSession";
tag(): string {
return "effect";
}
}

console.log((BaseSession as any)[entityKind]);
console.log((EffectSession as any)[entityKind]);
console.log(new EffectSession().tag());
Loading