scriptsharp
scriptsharp copied to clipboard
IntrinsicProperty crashes the compiler when not in an Imported class
Marking a property as intrinsic, if it isn't in a class that is Imported, crashes the compiler with no error messages.
A simple test case is:
public class Class1
{
private string m_lastName;
[IntrinsicProperty]
public string LastName
{
get { return m_lastName; }
set { m_lastName = value; }
}
}
When using the command line compiler on this file, it results in a NullReferenceException
As you've noticed, intrinsic properties are only meant for use in imported classes. Yes, that shouldn't cause a crash, but just avoid this as it isn't the scenario for intrinsic properties.