Conversations on T# compiler features, usability, wish list...
20/05/2010 9:11:32 AM
 Arsène von Wyss Posts: 8
|
Using V1.9.1 build 1101.
I created a new test project with the following test (sorry for the formatting - does this forum support code blocks?):
using System;
using TSharp.Criteria;
namespace bsn.GoldParserTest
{
testclass
{
test
{
runtest 1=0;
}
}
}
I do know that it should be 1==0 instead of 1=0, but I didn't expect the compiler to throw a NullReferenceException:
Task "TSharpCompiler"
T# Compilation Task
C:\Program Files (x86)\MSBuild\Pretty Objects\TSharp\1.0\TSharp.targets(22,5): error : TSharpCompiler.Nodes.TSharpDebugException: Z:\Test\TestClass.ts(10,16): System.NullReferenceException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at TSharpCompiler.Nodes.Expressions.AssignmentExpression.get_HasSideEffects() in C:\TeamCity\buildAgent\work\f825465bfabafd8d\TSharpComp\TSharpCompiler\Nodes\Expressions\AssignmentExpression.cs:line 106
at TSharpCompiler.Nodes.Expressions.Expression.ValidateUsage(Statement currentStatement) in C:\TeamCity\buildAgent\work\f825465bfabafd8d\TSharpComp\TSharpCompiler\Nodes\Expressions\Expression.cs:line 564
at TSharpCompiler.Nodes.Expressions.AssignmentExpression.ValidateUsage(Statement currentStatement) in C:\TeamCity\buildAgent\work\f825465bfabafd8d\TSharpComp\TSharpCompiler\Nodes\Expressions\AssignmentExpression.cs:line 242
at TSharpCompiler.Nodes.Expressions.Expression.SafeValidateUsage(Statement currentStatement) in C:\TeamCity\buildAgent\work\f825465bfabafd8d\TSharpComp\TSharpCompiler\Nodes\Expressions\Expression.cs:line 545
--- End of inner exception stack trace ---
at TSharpCompiler.Nodes.Expressions.Expression.SafeValidateUsage(Statement currentStatement) in C:\TeamCity\buildAgent\work\f825465bfabafd8d\TSharpComp\TSharpCompiler\Nodes\Expressions\Expression.cs:line 557
at TSharpCompiler.Nodes.Statements.ExpressionStatement.ValidateUsage() in C:\TeamCity\buildAgent\work\f825465bfabafd8d\TSharpComp\TSharpCompiler\Nodes\Statements\ExpressionStatement.cs:line 76
at TSharpCompiler.Nodes.Statements.Statement.SafeValidateUsage() in C:\TeamCity\buildAgent\work\f825465bfabafd8d\TSharpComp\TSharpCompiler\Nodes\Statements\Statement.cs:line 388
at TSharpCompiler.TSharpSpecific.RuntestStatement.ValidateUsage() in C:\TeamCity\buildAgent\work\f825465bfabafd8d\TSharpComp\TSharpCompiler\TSharpSpecific\RuntestStatement.cs:line 211
at TSharpCompiler.Nodes.Statements.Statement.SafeValidateUsage() in C:\TeamCity\buildAgent\work\f825465bfabafd8d\TSharpComp\TSharpCompiler\Nodes\Statements\Statement.cs:line 388
at TSharpCompiler.Nodes.Statements.CompositeStatement.ValidateUsage(StatementStatus& otherStatus) in C:\TeamCity\buildAgent\work\f825465bfabafd8d\TSharpComp\TSharpCompiler\Nodes\Statements\CompositeStatement.cs:line 311
at TSharpCompiler.Nodes.Statements.TopLevelBlockStatement.ValidateUsage() in C:\TeamCity\buildAgent\work\f825465bfabafd8d\TSharpComp\TSharpCompiler\Nodes\Statements\TopLevelBlockStatement.cs:line 155
at TSharpCompiler.Nodes.Statements.Statement.SafeValidateUsage() in C:\TeamCity\buildAgent\work\f825465bfabafd8d\TSharpComp\TSharpCompiler\Nodes\Statements\Statement.cs:line 388
at TSharpCompiler.Nodes.CSI.MethodDeclaration.ValidateUsage() in C:\TeamCity\buildAgent\work\f825465bfabafd8d\TSharpComp\TSharpCompiler\Nodes\CSI\MethodDeclaration.cs:line 443
at TSharpCompiler.TSharpSpecific.TestMethodDeclaration.ValidateUsage() in C:\TeamCity\buildAgent\work\f825465bfabafd8d\TSharpComp\TSharpCompiler\TSharpSpecific\TestMethodDeclaration.cs:line 461
at TSharpCompiler.Nodes.CSI.CSIDeclaration.ValidateMemberUsage() in C:\TeamCity\buildAgent\work\f825465bfabafd8d\TSharpComp\TSharpCompiler\Nodes\CSI\CSIDeclaration.cs:line 2443
at TSharpCompiler.TSharpSpecific.TestClassDeclaration.ValidateUsage() in C:\TeamCity\buildAgent\work\f825465bfabafd8d\TSharpComp\TSharpCompiler\TSharpSpecific\TestClassDeclaration.cs:line 199
at TSharpCompiler.Compiler.TSCompiler.Compile(String projectPath, Program programToCompile, ICompilerStrategy strategy, Boolean reflectionOnly) in C:\TeamCity\buildAgent\work\f825465bfabafd8d\TSharpComp\TSharpCompiler\Compiler\TSCompiler.cs:line 224
at TSharp.MSBuild.Compiler.Compile(TaskLoggingHelper taskLogger, String projectPath, String[] constants, String[] sourceFiles, PEFileKinds targetKind, Boolean includeDebugInformation, String outputAssembly, IEnumerable assemblyFullNames, IEnumerable assemblyFileNames, String[] signatureFormats, String[] nameFormats) in C:\TeamCity\buildAgent\work\f825465bfabafd8d\TSharpComp\TSharp.MSBuild\Compiler.cs:line 67
Z:\Test\TestClass.ts(10,14): error TS400090: '1' cannot be written to
|
|
0
• permalink
|
20/05/2010 12:34:33 PM
 Ludovic Dubois Administrator Posts: 155
|
The error message is here (last line): Z:\Test\TestClass.ts(10,14): error TS400090: '1' cannot be written to But I agree: the exception should not be thrown!
I just add it to our bugs tracker system: http://bugs.prettyobjects.com We will resolve it soon, you can watch the issue if you want.
|
|
0
• permalink
|
21/05/2010 9:38:45 AM
 Arsène von Wyss Posts: 8
|
Great, thanks! I'll add issues to the bug tracker in the future; I didn't know where else to post it than here.
|
|
0
• permalink
|