Page MenuHomeFeedback Tracker

array<ref int> should not be allowed to compile but does
Assigned, NormalPublic

Description

The below code should not compile because primitive types are not allowed to be used in a strong reference context. In other situations such as class members, it throws correctly, but for array/template params in general it does not.

array<ref int> intArray = {42, 1337};
Print(intArray);

SCRIPT : array<@int> intArray = 0x000002583E7DF248 {42,1337}

Details

Severity
Tweak
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General

Event Timeline

Geez changed the task status from New to Assigned.Jul 14 2023, 11:22 AM