Ticket #318: fwd-ref.patch
File fwd-ref.patch, 1.2 KB (added by hopscc, 12 years ago) |
---|
-
Source/Members.cobra
516 516 """ 517 517 t = .type 518 518 if t, return t 519 if not .didBindImp # called via a fwd reference, bindImp not yet run on it 520 return .compiler.passThroughType # placeholder 519 521 else, throw FallThroughException('_type is nil. this=[this]') 520 522 521 523 pro type as IType? -
Tests/900-misc/010-internal-err-fwd.cobra
1 # failure : compiler internal error - forward ref to static field 2 use System.IO 3 use System.Collections 4 use System.Collections.Generic 5 use System 6 7 namespace AnyNode 8 class Server 9 def main is shared 10 pass 11 12 class NetStream 13 var _bufferSize as int = Config.bufferSize 14 15 class Config 16 var bufferSize as int 17 is shared, readonly 18 var traceLogging as bool 19 is shared, readonly 20 21 cue init is shared 22 .bufferSize = 1024 23 .traceLogging = false 24