Files
wren/test/language/inheritance/inherit_from_closure.wren
T

9 lines
200 B
Plaintext
Raw Normal View History

2015-02-27 08:08:27 -08:00
var ClosureType
{
var a = "a"
2015-09-15 07:46:09 -07:00
ClosureType = Fn.new { System.print(a) }.type
2015-02-27 08:08:27 -08:00
}
2015-08-15 12:07:53 -07:00
class Subclass is ClosureType {} // expect runtime error: Class 'Subclass' cannot inherit from built-in class 'Fn'.