Skip to content

invalid assignment through untyped causes assertion fail #8233

Description

@Antriel
class Test {
  static function main() {
    var foo = new Foo();
    untyped foo.bar = function() trace('bar');
    foo.bar();
  }
}
class Foo { 
  public function new() { } 
  public inline function bar() trace('foo'); 
}

Results in assertion fail at

haxe/src/typing/typer.ml

Lines 514 to 515 in f2f4dc1

| AKInline _ | AKMacro _ ->
assert false)

Without untyped it properly gives error message. Should this assertion be changed into error or should it be handled sooner?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions