You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reject implicit pointer-depth loss when taking the address of str #358
bugA problem that causes incorrect behavior or crashes.help wantedThe issue requires extra attention or help from others.needs testingIssues that require additional testing or verification.
The old reproduction in #226 no longer prints corrupted string data, but a narrower type-checking defect remains.
fun main() {
var message: str = "Hello";
var correct: ptr<str> = &message;
var wrong: ptr<i8> = &message;
}
&message denotes the address of the str variable and therefore has type ptr<str>. The compiler currently also accepts the ptr<i8> initializer, implicitly losing one pointer level.
Expected behavior
ptr<str> = &message remains valid.
ptr<i8> = &message fails during semantic checking with a source diagnostic.
Accessing the string data itself remains explicit and does not change raw-pointer support.
Completion criteria
wavec check rejects the invalid initializer before code generation.
wavec build reports the same frontend error.
Valid str, ptr<str>, and explicit pointer cast cases have regressions.
No implicit pointer-depth conversion is introduced elsewhere.
This issue replaces the stale output-focused report #226 with a precise current contract.
bugA problem that causes incorrect behavior or crashes.help wantedThe issue requires extra attention or help from others.needs testingIssues that require additional testing or verification.
Activity