From 713ddefc385431f23de3496bfd24ef953206aa9f Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Sun, 10 Mar 2024 12:47:02 +0200 Subject: [PATCH] Parser - Function definition now have a default access modifier of `PRIVATE` --- source/tlang/compiler/parsing/core.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/tlang/compiler/parsing/core.d b/source/tlang/compiler/parsing/core.d index 8368083..5480875 100644 --- a/source/tlang/compiler/parsing/core.d +++ b/source/tlang/compiler/parsing/core.d @@ -1867,7 +1867,7 @@ public final class Parser * We also ensure it is in the order or [ACC_MOD, INIT_SCOPE] */ Entity funcEntity; - AccessorType potAccMod = AccessorType.UNKNOWN; + AccessorType potAccMod = AccessorType.PRIVATE; InitScope potInitScp = InitScope.UNKNOWN; if(hasModifierItems()) @@ -3751,11 +3751,11 @@ public int i = 2; assert(cast(Function)func); // Ensure it is a Function assert(func.getAccessorType() == AccessorType.PUBLIC); - /* Find the function named `d` and make sure it is public */ + /* Find the function named `d` and make sure it is private (default) */ func = tc.getResolver().resolveBest(modulle, "func_d"); assert(func); assert(cast(Function)func); // Ensure it is a Function - assert(func.getAccessorType() == AccessorType.PUBLIC); + assert(func.getAccessorType() == AccessorType.PRIVATE); } catch(TError e) {