From 65f75ec5ca7d1298783c54e8ef45e0135219af52 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 27 Dec 2025 09:10:37 +0800 Subject: [PATCH 1/2] fix: check native source correctly native code's internal path is ~lib/native.ts instead of ~lib. However, it is more easier to check current source is same as static _native field. --- src/ast.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ast.ts b/src/ast.ts index da2271ef3d..2abc689ecb 100644 --- a/src/ast.ts +++ b/src/ast.ts @@ -1668,7 +1668,7 @@ export class Source extends Node { /** Checks if this source represents native code. */ get isNative(): bool { - return this.internalPath == LIBRARY_SUBST; + return this == Source._native; } /** Checks if this source is part of the (standard) library. */ From 0a35cbaaa4563e0d21a2bafe954231db3c62e709 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 27 Dec 2025 10:01:15 +0800 Subject: [PATCH 2/2] fix lint: --- src/ast.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ast.ts b/src/ast.ts index 2abc689ecb..01d8e9a421 100644 --- a/src/ast.ts +++ b/src/ast.ts @@ -18,7 +18,6 @@ import { CommonFlags, PATH_DELIMITER, LIBRARY_PREFIX, - LIBRARY_SUBST } from "./common"; import {