class Foo:
def Do(param as object):
debug param
def Do[of T](param as T):
debug param
def test():
self.Do[of string]('asdf')
f = Foo()
f.Do[of string]('asdf')
f.test()
In the above code if I remove the reference to self, ie: I replace...
self.Do[of string]('asdf')
with...
Do[of string]('asdf')
The compiler fails with ...
Entering Boo.Lang.Compiler.Steps.EmitAssembly
ASSEMBLY LOADED: <dynamic>test2, Version=1.0.2974.0, Culture=neutral, PublicKeyToken=null
ASSEMBLY LOADED: C:\WINDOWS\assembly\GAC_32\ISymWrapper\2.0.0.0__b03f5f7f11d50a3a\ISymWrapper.dll
MyClass.boo(14,22): Internal compiler error on node 'Do[of string]('asdf')': System.NullReferenceException: Object reference not set to an instance of an object.
at Boo.Lang.Compiler.Steps.EmitAssembly.InvokeRegularMethod(IMethod method, MethodInfo mi, MethodInvocationExpression node)
at Boo.Lang.Compiler.Steps.EmitAssembly.InvokeMethod(IMethod method, MethodInvocationExpression node)
at Boo.Lang.Compiler.Steps.EmitAssembly.OnMethodInvocationExpression(MethodInvocationExpression node)
at Boo.Lang.Compiler.Ast.MethodInvocationExpression.Accept(IAstVisitor visitor)
at Boo.Lang.Compiler.Ast.DepthFirstVisitor.Visit(Node node)
Leaving Boo.Lang.Compiler.Steps.EmitAssembly
Fixed in rev. 2928