History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: BOO-979
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Marcus Griep
Reporter: Spruce Weber
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Boo

compiler error on external generic methods called with internal arguments

Created: 12/Mar/08 11:04 AM   Updated: 09/Apr/08 03:41 PM
Component/s: Compiler
Affects Version/s: 0.8.1
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. Text File EmitAssembly.cs.patch (0.3 kb)

Environment:
XP
.Net 2.0

Patch Submitted: Yes


 Description  « Hide
///assembly one...
public class AnExternalClass:
public static def Do[of T](p as T):
pass

///assembly two...
class Class2:
pass

c = Class2()
AnExternalClass.Do[of Class2](c)

Results in the following error included below. The included patch fixes this. The method EmitAsssembly.CheckConditionalAttributes was assuming that GenericConstructedMethod.GenericDefinition would be of type InternalMethod. But it can also be of type ExternalMethod.

test01.boo(34,30): Internal compiler error on node 'AnExternalClass.Do[of Class2](c)': System.NullReferenceException: Object reference not set to an instance of an object.
at Boo.Lang.Compiler.Steps.EmitAssembly.CheckConditionalAttributes(IMethod method, MethodInfo mi) in C:\boo_svn_ms\src\Boo.Lang.Compiler\Steps\EmitAssembly.cs:line 2107
at Boo.Lang.Compiler.Steps.EmitAssembly.InvokeRegularMethod(IMethod method, MethodInfo mi, MethodInvocationExpression node) in C:\boo_svn_ms\src\Boo.Lang.Compiler\Steps\EmitAssembly.cs:line 2064
at Boo.Lang.Compiler.Steps.EmitAssembly.InvokeMethod(IMethod method, MethodInvocationExpression node) in C:\boo_svn_ms\src\Boo.Lang.Compiler\Steps\EmitAssembly.cs:line 2021
at Boo.Lang.Compiler.Steps.EmitAssembly.OnMethodInvocationExpression(MethodInvocationExpression node) in C:\boo_svn_ms\src\Boo.Lang.Compiler\Steps\EmitAssembly.cs:line 2349
at Boo.Lang.Compiler.Ast.MethodInvocationExpression.Accept(IAstVisitor visitor) in C:\boo_svn_ms\src\Boo.Lang.Compiler\Ast\Impl\MethodInvocationExpressionImpl.cs:line 67
at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node node) in C:\boo_svn_ms\src\Boo.Lang.Compiler\Ast\DepthFirstVisitor.cs:line 42



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Marcus Griep - 09/Apr/08 03:41 PM
Looked good and was committed.