aboutsummaryrefslogtreecommitdiff
path: root/src/Sema.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-04-07 15:43:54 -0700
committerGitHub <noreply@github.com>2024-04-07 15:43:54 -0700
commite204a6edb8866093a087ef2325a5d6ea1824487c (patch)
tree8d4b1db9110c55bb0684791d7f2b33a8a19eb247 /src/Sema.zig
parent278db0ad4543d7a768c63c5482b8873b58690920 (diff)
parentb381fb805cfe382a6786f2f1ae670d440d4184bf (diff)
downloadzig-e204a6edb8866093a087ef2325a5d6ea1824487c.tar.gz
zig-e204a6edb8866093a087ef2325a5d6ea1824487c.zip
Merge pull request #18988 from castholm/lazy-build-zig
std.Build: add `lazyImport` (`@import` for lazy dependencies)
Diffstat (limited to 'src/Sema.zig')
-rw-r--r--src/Sema.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Sema.zig b/src/Sema.zig
index 3635d39b98..d64226fef0 100644
--- a/src/Sema.zig
+++ b/src/Sema.zig
@@ -7531,10 +7531,12 @@ fn analyzeCall(
var is_generic_call = func_ty_info.is_generic;
var is_comptime_call = block.is_comptime or modifier == .compile_time;
+ var is_inline_call = is_comptime_call or modifier == .always_inline or func_ty_info.cc == .Inline;
var comptime_reason: ?*const Block.ComptimeReason = null;
- if (!is_comptime_call) {
+ if (!is_inline_call and !is_comptime_call) {
if (sema.typeRequiresComptime(Type.fromInterned(func_ty_info.return_type))) |ct| {
is_comptime_call = ct;
+ is_inline_call = ct;
if (ct) {
comptime_reason = &.{ .comptime_ret_ty = .{
.block = block,
@@ -7548,8 +7550,6 @@ fn analyzeCall(
else => |e| return e,
}
}
- var is_inline_call = is_comptime_call or modifier == .always_inline or
- func_ty_info.cc == .Inline;
if (sema.func_is_naked and !is_inline_call and !is_comptime_call) {
const msg = msg: {