+= string concatenation failing with struct to class property concat
See original GitHub issueHello i saw this issues in bridge.net and try to run it on h5 In fact, the problem also exists in h5. here is the sample : Expected: Animal Farm Actual: Animal
using System;
using H5;
using H5.Core;
using static H5.Core.es5;
using static H5.Core.dom;
using Console = System.Console;
namespace h5
{
public struct Book
{
public string Title;
}
public class Delivery
{
public Book[] Books;
}
class Program
{
static void Main(string[] args)
{
{
var delivery = new Delivery();
delivery.Books = new Book[1];
delivery.Books[0] = new Book();
delivery.Books[0].Title = "Animal";
delivery.Books[0].Title += " Farm";
// Expected: Animal Farm
// Actual: Animal
Console.Log(delivery.Books[0].Title);
}
}
}
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
c# - New Reference When Concatenating A String
It will first follow the reference to the "old" a and concat that ... a property of a class (since the whole class...
Read more >Is it inefficient to concatenate strings one at a time?
In some browsers, string concatenation appears to be optimized automatically, and in other cases it isn't. So the recommendation (at least in ...
Read more >Compile-time string concatenation | Andrzej's C++ blog
We will start with a bug, taken from real life. It spans across three files: Question: what happens when this program is executed?...
Read more >Setting <Image /> source with string concatenation fails ...
The above fails with the usual: Requiring unknown module "image!somwething_for_somethingelse". If you are sure the module is there, try ...
Read more >+ Concatenation operator - Progress Documentation
Joins two character strings or expressions. The data type of the returned value matches the data type of the expressions passed to the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As I know gitter is available https://gitter.im/curiosityai/h5
I have no complaints about test codes . But thanks for mentioning this.