You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@motif.Scope
public interface FooScope {
Foo foo();
@motif.Objects
abstract class Objects extends OptionModule {
}
}
class Foo {
private final Bar bar;
public Foo(Bar bar) {
this.bar = bar;
}
}
class Bar {}
abstract class OptionModule {
abstract Bar bar();
Foo foo(Bar bar) {
return new Foo(bar);
}
}
The above code will compile. However, if you add a static key word in OptionModule that is working as Foo factory method, the motif compiler will fail.
abstract class OptionModule {
abstract Bar bar();
static Foo foo(Bar bar) {
return new Foo(bar);
}
}
You could stably reproduce this issue based on this repo.
The above code will compile. However, if you add a
static
key word inOptionModule
that is working asFoo
factory method, the motif compiler will fail.You could stably reproduce this issue based on this repo.
TonyTangAndroid/motif_static_issue#1
The text was updated successfully, but these errors were encountered: