Skip to content

[X#3] Unexpected behaviour calling a typed method with parameter int #1946

@hpetriffer

Description

@hpetriffer

The following code

	var test1 := TestClass{}
	var x := test1.TestMethod(nil, nil)

	var test2 := (usual)TestClass{}
	var y := test2.TestMethod(nil, nil)

	Console.WriteLine("Result: " + x.ToString() + ", " + y.ToString())
	Console.ReadLine()

results to an output Result: 0, 30

In this case I expect an compile error or at least a warning. If not changing something in a typed call, can result to an unexpected behaviour.
XSharpTests.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions