Thanks to visit codestin.com
Credit goes to github.com

Skip to content

(x * y).<AnyMethod()> fails to compile without assignment #7502

@ashwinimurt

Description

@ashwinimurt

Steps to Reproduce

Run this test case:

using System;
using System.Numerics;
class Program {

	static void Main()
	{
	    int x = 10;
	    int y = 20;
	    (x * y).ToString();

	    Quaternion A = Quaternion.Identity;
	    Quaternion B = Quaternion.Identity;
	    (B * Quaternion.Inverse(A)).ToString();
    }
}

Current Behavior

Compilation fails
Errors:
image

(C# compiler succeeds)

Change line 9 from (x * y).ToString(); to string test= (x * y).ToString(); -> no error on that line.

Expected Behavior

Compilation succeeds

On which platforms did you notice this

[ ] macOS
[ ] Linux
[x] Windows

Version Used:

Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           normal
        SIGSEGV:       normal
        Notification:  Thread + polling
        Architecture:  x86
        Disabled:      none
        Misc:          softdebug
        Interpreter:   yes
        LLVM:          supported, not enabled.
        GC:            sgen (concurrent by default)```

### Stacktrace

Please paste the stacktrace here if available.


<!--

You can join us at https://gitter.im/mono/mono to discuss your reported issue

-->

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions