Browse source

Changelog

Query
From:
To:
Branch:
Path:
Message:
BugID:
User: +
Format:
: 2 checkins (+204/-132) by Henrik Grubbström (Grubba) <grubba@grubba.org> Lines added/removed recently

Tuesday 16 August 2022

2022-08-16 10:51:52 (4 months ago) by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix optimizer breaking type check.

The optimizer converted code like:

object(Foo) foo = base_obj;
foo++;

into

object(Foo) foo = base_obj + 1;

This caused the type checker to (erroneously) complain about
assigning 1 to foo if base_obj was typed as an object that
did not have an lfun::`+().

Now it is instead converted into:

object(Foo) foo = ([object(Foo)] base_obj) + 1;

Also removes the warning about no-op soft casts.

[permalink]

Bugs? Suggestions?