Search Issue Tracker
Fixed in 2018.3.X
Votes
0
Found in
2018.1.0b1
2018.1.0b12
Issue ID
1019866
Regression
Yes
Valid code no longer compiles in new Unity versions
How to reproduce:
1. Open tester's project (CompileTestProject.zip)
2. Open "Test.unity" scene
Expected result: Code in "Test.cs" file compiles without problems
Actual result: Code in "Test.cs" file won't compile and throw errors at line 15
Reproducible with: 2018.1.0b1, 2018.1.0b12, 2018.2.0a7
Not reproducible with: 5.6.5.p3, 2017.1.3p2, 2017.2.2p2, 2017.3.2f1, 2017.4.1f1, 2018.1.0a1, 2018.1.0a7
Notes:
- Can be reproduced with both Mono versions
Upstream Bug: https://github.com/mono/mono/issues/7502
workaround is to store in a temp variable
change
(x * y).ToString();
to
var tmp = (x * y);
tmp.ToString();
Resolution: This is fixed at 2018.3 by using Roslyn rather than mcs when targeting the new scripting runtime.
Verified in: 2018.3.0a2
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “MissingReferenceException”, “NullReferenceException” and GUI errors are spammed in the Console when selecting “Boris” GameObject in the Prefab field of the “Plunkah” GameObject in the “_IK” Sample scene
- "Upload Symbols Failed" is thrown when Archive validation is being done in Xcode
- Active quality level set on a new Universal 2D project is not the default quality level when creating a new project
- Inspector Open button does nothing when navigating to a different folder with a locked asset
- Pre-generated XML serializers fail to deserialize types that use polymorphism when the Player is built with the IL2CPP scripting backend
Add comment