Originally created by @odenix on GitHub (Nov 5, 2024).
The following program fails in 0.26.3 but passes in 0.27.0.
(My understanding is that the goal was to preserve semantics of Listing typechecks.)
local a = new Listing { new Listing { 0 } }
// 0.26.3 fails here, 0.27.0 doesn't
local b = a as Listing<Listing<String>>
local c = (b) { new Listing { 1 } }
local d = c as Listing<Listing<Int>>
result = d
Originally created by @odenix on GitHub (Nov 5, 2024).
The following program fails in 0.26.3 but passes in 0.27.0.
(My understanding is that the goal was to preserve semantics of Listing typechecks.)
```
local a = new Listing { new Listing { 0 } }
// 0.26.3 fails here, 0.27.0 doesn't
local b = a as Listing<Listing<String>>
local c = (b) { new Listing { 1 } }
local d = c as Listing<Listing<Int>>
result = d
```
adam
added the bug label 2025-12-30 01:22:39 +01:00
Ah, I think this is a regression in our typechecking logic. It shouldn't be possible to amend b and get members of type Listing<Int>.
@bioball commented on GitHub (Nov 5, 2024):
Ah, I think this is a regression in our typechecking logic. It shouldn't be possible to amend `b` and get members of type `Listing<Int>`.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @odenix on GitHub (Nov 5, 2024).
The following program fails in 0.26.3 but passes in 0.27.0.
(My understanding is that the goal was to preserve semantics of Listing typechecks.)
@bioball commented on GitHub (Nov 5, 2024):
Ah, I think this is a regression in our typechecking logic. It shouldn't be possible to amend
band get members of typeListing<Int>.