Skip to content

Args without type hints in overriden functions are monomorphs #12905

Description

@RblSb
typedef Size = {width:Float}

class Parent {
	public function onResize(size:Size):Void {}
}

class Main extends Parent {
	static function main() {}
	// Field onResize overrides parent class with different or incomplete type
	// error: { width : Int } should be Size
	override function onResize(size) { // works with Size type hint
		if (size.width == 0) {}
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions