feat: replace new keyword with this constructor syntax and ClassName.new() calls across core library and docs
Replace all uses of the `new` reserved word with explicit `this new()` constructor definitions and `ClassName.new()` instantiation calls in builtin/core.wren. Update all documentation files (classes.markdown, fiber.markdown, fn.markdown, sequence.markdown, error-handling.markdown, expressions.markdown, fibers.markdown, functions.markdown) to reflect the new constructor syntax, removing `new` keyword examples and replacing them with `ClassName.new()` patterns and `this new()` definitions.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
IO.print(Num is Class) // expect: true
|
||||
IO.print(true is Bool) // expect: true
|
||||
IO.print(new Fn { 1 } is Fn) // expect: true
|
||||
IO.print(Fn.new { 1 } is Fn) // expect: true
|
||||
IO.print(123 is Num) // expect: true
|
||||
IO.print(null is Null) // expect: true
|
||||
IO.print("s" is String) // expect: true
|
||||
@@ -8,7 +8,7 @@ IO.print("s" is String) // expect: true
|
||||
IO.print(Num is Bool) // expect: false
|
||||
IO.print(null is Class) // expect: false
|
||||
IO.print(true is Fn) // expect: false
|
||||
IO.print(new Fn { 1 } is Num) // expect: false
|
||||
IO.print(Fn.new { 1 } is Num) // expect: false
|
||||
IO.print("s" is Null) // expect: false
|
||||
IO.print(123 is String) // expect: false
|
||||
|
||||
@@ -16,7 +16,7 @@ IO.print(123 is String) // expect: false
|
||||
IO.print(Num is Object) // expect: true
|
||||
IO.print(null is Object) // expect: true
|
||||
IO.print(true is Object) // expect: true
|
||||
IO.print(new Fn { 1 } is Object) // expect: true
|
||||
IO.print(Fn.new { 1 } is Object) // expect: true
|
||||
IO.print("s" is Object) // expect: true
|
||||
IO.print(123 is Object) // expect: true
|
||||
|
||||
@@ -24,7 +24,7 @@ IO.print(123 is Object) // expect: true
|
||||
IO.print(Num is Class) // expect: true
|
||||
IO.print(null is Class) // expect: false
|
||||
IO.print(true is Class) // expect: false
|
||||
IO.print(new Fn { 1 } is Class) // expect: false
|
||||
IO.print(Fn.new { 1 } is Class) // expect: false
|
||||
IO.print("s" is Class) // expect: false
|
||||
IO.print(123 is Class) // expect: false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user