1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-06 14:56:54 +02:00

Merge pull request #3510 from aditmehta9/patch-1

Updated initialiser
This commit is contained in:
Pratik Karki
2019-05-05 22:04:36 +05:45
committed by GitHub

View File

@@ -708,7 +708,7 @@ class MyClass {
// We also get the compiler-generated initializer, with one argument per field.
// Note that soon there will be no compiler-generated initializer when we
// define any initializer(s) explicitly.
proc MyClass(val : real) {
proc init(val : real) {
this.memberInt = ceil(val): int;
}