Skip to content

len() of a constant string16 is incorrectΒ #6270

@c4veman

Description

@c4veman
Odin: dev-2026-02:6386b395d
OS: Windows 10 Professional (version: 22H2), build 19045.6466
CPU: Intel(R) Core(TM) i5-9600KF CPU @ 3.70GHz
RAM: 16322 MiB
Backend: LLVM 20.1.0
package main

import "core:fmt"

main :: proc() {
	const :: string16("😟")
	var := string16("😟")
	fmt.printfln("%v %v", len(const), len(var)) 
	// expected: 2 2
	// got: 4 2
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugreplicatedWe were able to replicate the bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions