Wiki

Ticket #259 (closed defect: fixed)

Opened 14 years ago

Last modified 13 years ago

Cannot access protected "method" in "_var" whose type is "Clazz<of T>"

Reported by: blubb Owned by: Chuck
Priority: major Milestone:
Component: Cobra Compiler Version:
Keywords: Cc:

Description

It seems there is some problem with protected methods in generic classes:

test.cobra:


class Clazz<of T>

var _var as Clazz<of T>

def method is protected

_var.method

class Program

def main

Clazz<of String>()


$ ./cobra -c test.cobra
test.cobra(6): error: Cannot access protected "method" in "_var" whose type is "Clazz<of T>".
Compilation failed - 1 error, 0 warnings

Change History

Changed 13 years ago by Chuck

  • owner set to Chuck
  • status changed from new to assigned

I'll have a fix for this one soon.

Changed 13 years ago by Chuck

The error checking around protected members has turned out to be non-trivial. Generics complicate this. Class hierarchies complicate this. I'm working through it. The upshot is that the final checkin will cover many more cases than just what's in this ticket.

Changed 13 years ago by Chuck

  • status changed from assigned to closed
  • resolution set to fixed

Thanks for the report. Fixed in changeset:2454 with other improvements.

Note: See TracTickets for help on using tickets.