p4lang / p4-spec

Apache License 2.0
175 stars 80 forks source link

Are instances local compile-time known? #1309

Open jaehyun1ee opened 3 hours ago

jaehyun1ee commented 3 hours ago

A follow-up issue from #1305.

Section 18.1. Compile-time known and local compile-time known values lists,

Instances constructed by instance declarations (Section 11.3) and constructor invocations.

as a local compile-time known value.

But since constructor arguments are compile-time known, shouldn't instances also be compile-time known? Or are there cases where we need instances to be local compile-time known?

ChrisDodd commented 3 hours ago

"local compile-time known" is more restrictive than "compile-time-known", so this is more a matter of instances being allowed to be local compile time known, even though their constructor arguments may not be.