File tree 3 files changed +22
-2
lines changed
e2e/suite/testcases/resolve
3 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -101,3 +101,18 @@ contract JettonMinter {
101
101
6:12 -> 4:9 resolved
102
102
7:13 -> 2:4 resolved
103
103
8:12 -> 4:25 resolved
104
+
105
+ ========================================================================
106
+ Contract constant from trait
107
+ ========================================================================
108
+ trait Foo {
109
+ const FOO: Int = 100;
110
+ }
111
+
112
+ contract JettonMinter with Foo {
113
+ get fun foo(): Int {
114
+ return self.<caret>FOO;
115
+ }
116
+ }
117
+ ------------------------------------------------------------------------
118
+ 6:20 -> 1:10 resolved
Original file line number Diff line number Diff line change @@ -210,10 +210,10 @@ export class Reference {
210
210
if ( methodRef ) {
211
211
if ( ! this . processNamedEls ( proc , state , qualifierType . methods ( ) ) ) return false
212
212
if ( ! this . processNamedEls ( proc , state , qualifierType . ownFields ( ) ) ) return false
213
- if ( ! this . processNamedEls ( proc , state , qualifierType . ownConstants ( ) ) ) return false
213
+ if ( ! this . processNamedEls ( proc , state , qualifierType . constants ( ) ) ) return false
214
214
} else {
215
215
if ( ! this . processNamedEls ( proc , state , qualifierType . ownFields ( ) ) ) return false
216
- if ( ! this . processNamedEls ( proc , state , qualifierType . ownConstants ( ) ) ) return false
216
+ if ( ! this . processNamedEls ( proc , state , qualifierType . constants ( ) ) ) return false
217
217
if ( ! this . processNamedEls ( proc , state , qualifierType . methods ( ) ) ) return false
218
218
}
219
219
}
Original file line number Diff line number Diff line change @@ -66,6 +66,11 @@ export class StorageMembersOwnerTy<Anchor extends StorageMembersOwner> extends B
66
66
return this . anchor . ownConstants ( )
67
67
}
68
68
69
+ public constants ( ) : Constant [ ] {
70
+ if ( this . anchor === null ) return [ ]
71
+ return this . anchor . constants ( )
72
+ }
73
+
69
74
public methods ( ) : Fun [ ] {
70
75
if ( this . anchor === null ) return [ ]
71
76
return this . anchor . methods ( )
You can’t perform that action at this time.
0 commit comments